Skip to content

Commit

Permalink
refactor: improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
Aunali321 committed Jun 12, 2023
1 parent 20ffef3 commit 1ad906f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
3 changes: 1 addition & 2 deletions lib/ui/views/home/home_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import 'package:revanced_manager/ui/views/navigation/navigation_viewmodel.dart';
import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/homeView/update_confirmation_dialog.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_material_button.dart';
import 'package:revanced_manager/utils/about_info.dart';
import 'package:stacked/stacked.dart';
import 'package:stacked_services/stacked_services.dart';

Expand Down Expand Up @@ -114,7 +113,7 @@ class HomeViewModel extends BaseViewModel {
Future<bool> hasManagerUpdates() async {
String currentVersion = await _managerAPI.getCurrentManagerVersion();
_latestManagerVersion = await _managerAPI.getLatestManagerVersion();

// add v to current version
if (!currentVersion.startsWith('v')) {
currentVersion = 'v$currentVersion';
Expand Down
3 changes: 2 additions & 1 deletion lib/ui/views/installer/installer_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ class InstallerView extends StatelessWidget {
SliverFillRemaining(
hasScrollBody: false,
child: SizedBox(
height: MediaQuery.of(context).viewPadding.bottom),
height: MediaQuery.of(context).viewPadding.bottom,
),
),
],
),
Expand Down
12 changes: 8 additions & 4 deletions lib/ui/widgets/appSelectorView/installed_app_item.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'dart:typed_data';

import 'package:flutter/material.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';

class InstalledAppItem extends StatefulWidget {
const InstalledAppItem({
Expand Down Expand Up @@ -63,9 +64,11 @@ class _InstalledAppItemState extends State<InstalledAppItem> {
),
),
const SizedBox(width: 4),
I18nText(widget.installedVersion.isEmpty
? 'All versions'
: 'v${widget.installedVersion}'),
I18nText(
widget.installedVersion.isEmpty
? 'All versions'
: 'v${widget.installedVersion}',
),
],
),
Text(widget.pkgName),
Expand All @@ -81,6 +84,7 @@ class _InstalledAppItemState extends State<InstalledAppItem> {
: 'v${widget.suggestedVersion}'
},
),
),
const SizedBox(width: 4),
Text(
widget.patchesCount == 1
Expand Down

0 comments on commit 1ad906f

Please sign in to comment.