mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: show open button to non-updatable apps
This commit is contained in:
parent
9317714651
commit
af8e753ea6
@ -19,6 +19,7 @@
|
|||||||
},
|
},
|
||||||
"applicationItem": {
|
"applicationItem": {
|
||||||
"patchButton": "Patch",
|
"patchButton": "Patch",
|
||||||
|
"openButton": "Open",
|
||||||
"changelogLabel": "Changelog"
|
"changelogLabel": "Changelog"
|
||||||
},
|
},
|
||||||
"latestCommitCard": {
|
"latestCommitCard": {
|
||||||
|
@ -37,11 +37,11 @@ class ManagerAPI {
|
|||||||
|
|
||||||
Future<bool> hasAppUpdates(String packageName) async {
|
Future<bool> hasAppUpdates(String packageName) async {
|
||||||
// TODO: get status based on last update time on the folder of this app?
|
// TODO: get status based on last update time on the folder of this app?
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> getAppChangelog(String packageName) async {
|
Future<String> getAppChangelog(String packageName) async {
|
||||||
// TODO: get changelog based on last commits on the folder of this app?
|
// TODO: get changelog based on last commits on the folder of this app?
|
||||||
return 'to be implemented';
|
return 'To be implemented';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:device_apps/device_apps.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:revanced_manager/app/app.locator.dart';
|
import 'package:revanced_manager/app/app.locator.dart';
|
||||||
import 'package:revanced_manager/models/patched_application.dart';
|
import 'package:revanced_manager/models/patched_application.dart';
|
||||||
@ -37,9 +38,8 @@ class InstalledAppsCard extends StatelessWidget {
|
|||||||
patchDate: snapshot.data![index].patchDate,
|
patchDate: snapshot.data![index].patchDate,
|
||||||
changelog: snapshot2.data!,
|
changelog: snapshot2.data!,
|
||||||
isUpdatableApp: false,
|
isUpdatableApp: false,
|
||||||
onPressed: () =>
|
onPressed: () => DeviceApps.openApp(
|
||||||
locator<HomeViewModel>().navigateToPatcher(
|
snapshot.data![index].packageName,
|
||||||
snapshot.data![index],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -75,18 +75,18 @@ class ApplicationItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
isUpdatableApp
|
Padding(
|
||||||
? Padding(
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
child: PatchTextButton(
|
||||||
child: PatchTextButton(
|
text: isUpdatableApp
|
||||||
text: 'applicationItem.patchButton',
|
? 'applicationItem.patchButton'
|
||||||
onPressed: onPressed,
|
: 'applicationItem.openButton',
|
||||||
borderColor: isDark
|
onPressed: onPressed,
|
||||||
? const Color(0xff4D5054)
|
borderColor: isDark
|
||||||
: const Color.fromRGBO(119, 146, 168, 1),
|
? const Color(0xff4D5054)
|
||||||
),
|
: const Color.fromRGBO(119, 146, 168, 1),
|
||||||
)
|
),
|
||||||
: const SizedBox(),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user