Handle 0.0.0 latest version
This commit is contained in:
parent
e656244c64
commit
bbb4e46798
|
|
@ -36,7 +36,7 @@ abstract class AccountEntity
|
||||||
@BuiltValueField(wireName: 'current_version')
|
@BuiltValueField(wireName: 'current_version')
|
||||||
String get currentVersion;
|
String get currentVersion;
|
||||||
|
|
||||||
bool get isUpdateAvailable => latestVersion != currentVersion;
|
bool get isUpdateAvailable => latestVersion != currentVersion && latestVersion != '0.0.0';
|
||||||
|
|
||||||
static Serializer<AccountEntity> get serializer => _$accountEntitySerializer;
|
static Serializer<AccountEntity> get serializer => _$accountEntitySerializer;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -459,8 +459,7 @@ class SidebarFooter extends StatelessWidget {
|
||||||
if (state.prefState.isMenuCollapsed) ...[
|
if (state.prefState.isMenuCollapsed) ...[
|
||||||
Expanded(child: SizedBox())
|
Expanded(child: SizedBox())
|
||||||
] else ...[
|
] else ...[
|
||||||
if (account.currentVersion != account.latestVersion &&
|
if (account.isUpdateAvailable)
|
||||||
account.latestVersion != '0.0.0')
|
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.warning,
|
Icons.warning,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue