mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: Log saved patch option values (#1420)
This commit is contained in:
parent
e6a8f4e6dc
commit
e7d82850c9
@ -181,6 +181,14 @@ class InstallerViewModel extends BaseViewModel {
|
|||||||
|
|
||||||
Future<void> copyLogs() async {
|
Future<void> copyLogs() async {
|
||||||
final info = await AboutInfo.getInfo();
|
final info = await AboutInfo.getInfo();
|
||||||
|
dynamic getValue(String patchName, Option option) {
|
||||||
|
final Option? savedOption = _managerAPI.getPatchOption(_app.packageName, patchName, option.key);
|
||||||
|
if (savedOption != null) {
|
||||||
|
return savedOption.value;
|
||||||
|
} else {
|
||||||
|
return option.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final formattedLogs = [
|
final formattedLogs = [
|
||||||
'- Device Info',
|
'- Device Info',
|
||||||
@ -194,7 +202,7 @@ class InstallerViewModel extends BaseViewModel {
|
|||||||
'\n- Patch Info',
|
'\n- Patch Info',
|
||||||
'App: ${_app.packageName} v${_app.version}',
|
'App: ${_app.packageName} v${_app.version}',
|
||||||
'Patches version: ${_managerAPI.patchesVersion}',
|
'Patches version: ${_managerAPI.patchesVersion}',
|
||||||
'Patches: ${_patches.map((p) => p.name + (p.options.isEmpty ? '' : ' [${p.options.map((o) => '${o.title}: ${o.value}').join(", ")}]')).toList().join(", ")}',
|
'Patches: ${_patches.map((p) => p.name + (p.options.isEmpty ? '' : ' [${p.options.map((o) => '${o.title}: ${getValue(p.name, o)}').join(", ")}]')).toList().join(", ")}',
|
||||||
|
|
||||||
'\n- Settings',
|
'\n- Settings',
|
||||||
'Allow changing patch selection: ${_managerAPI.isPatchesChangeEnabled()}',
|
'Allow changing patch selection: ${_managerAPI.isPatchesChangeEnabled()}',
|
||||||
|
Loading…
Reference in New Issue
Block a user