Revert "feat: display app's patch count in appcard"

This reverts commit 8d4e4ba6c9.
This commit is contained in:
Ushie 2022-12-14 13:20:17 +03:00
parent d7624e5e1f
commit 62467007b2
3 changed files with 8 additions and 29 deletions

View File

@ -92,7 +92,6 @@ class _AppSelectorViewState extends State<AppSelectorView> {
name: app.appName,
pkgName: app.packageName,
icon: app.icon,
patchesCount: model.patchesCount(app.packageName),
onTap: () {
model.selectApp(app);
Navigator.of(context).pop();

View File

@ -16,9 +16,6 @@ class AppSelectorViewModel extends BaseViewModel {
final Toast _toast = locator<Toast>();
final List<ApplicationWithIcon> apps = [];
bool noApps = false;
int patchesCount(String packageName) {
return _patcherAPI.getFilteredPatches(packageName).length;
}
Future<void> initialize() async {
apps.addAll(await _patcherAPI.getFilteredInstalledApps());

View File

@ -6,7 +6,6 @@ class InstalledAppItem extends StatefulWidget {
final String name;
final String pkgName;
final Uint8List icon;
final int patchesCount;
final Function()? onTap;
const InstalledAppItem({
@ -14,7 +13,6 @@ class InstalledAppItem extends StatefulWidget {
required this.name,
required this.pkgName,
required this.icon,
required this.patchesCount,
this.onTap,
}) : super(key: key);
@ -47,29 +45,14 @@ class _InstalledAppItemState extends State<InstalledAppItem> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(
widget.name,
maxLines: 2,
overflow: TextOverflow.visible,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
const SizedBox(width: 6),
Text(
widget.patchesCount == 1
? "${widget.patchesCount} patch"
: "${widget.patchesCount} patches",
style: TextStyle(
fontSize: 8,
color: Theme.of(context).colorScheme.secondary,
),
),
],
Text(
widget.name,
maxLines: 2,
overflow: TextOverflow.visible,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
const SizedBox(height: 4),
Text(widget.pkgName),