Mweb fixes (#1972)

* quick fix [still investigating]

* cleaner quick fix

* cleaner quick fix

* log fix

* save to downloads would require an additional permission

* change address handling updates [skip ci]

* should change address not updating

* change address handling updates

* remove unnecessary code + don't reset change address index to 0
This commit is contained in:
Matthew Fosse
2025-01-24 20:09:48 +02:00
committed by GitHub
parent 9673b7c026
commit 199ada3fa9
7 changed files with 55 additions and 60 deletions
+6 -12
View File
@@ -77,15 +77,12 @@ class MwebLogsPage extends BasePage {
return AlertWithTwoActions(
alertTitle: S.of(context).export_backup,
alertContent: S.of(context).select_destination,
rightButtonText: S.of(context).save_to_downloads,
leftButtonText: S.of(context).share,
actionRightButton: () async {
const downloadDirPath = "/storage/emulated/0/Download";
final filePath = downloadDirPath + "/debug.log";
await mwebSettingsViewModelBase.saveLogsLocally(filePath);
rightButtonText: S.of(context).save,
leftButtonText: S.of(context).cancel,
actionLeftButton: () async {
Navigator.of(dialogContext).pop();
},
actionLeftButton: () async {
actionRightButton: () async {
Navigator.of(dialogContext).pop();
try {
await share(context);
@@ -101,11 +98,8 @@ class MwebLogsPage extends BasePage {
}
Future<void> share(BuildContext context) async {
final filePath = (await getAppDir()).path + "/debug.log";
bool success = await mwebSettingsViewModelBase.saveLogsLocally(filePath);
if (!success) return;
await ShareUtil.shareFile(filePath: filePath, fileName: "debug.log", context: context);
await mwebSettingsViewModelBase.removeLogsLocally(filePath);
final inAppPath = "${(await getApplicationSupportDirectory()).path}/logs/debug.log";
await ShareUtil.shareFile(filePath: inAppPath, fileName: "debug.log", context: context);
}
Future<void> _saveFile() async {