From 220046b45c47c28ba5ea3fb754ad9e8e3f93d102 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Mon, 14 Oct 2024 17:53:01 +0200 Subject: [PATCH 01/26] New translations app_en.arb (Chinese Simplified) --- lib/l10n/app_zh.arb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index b30466db..5739f6f2 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -1,5 +1,5 @@ { - "@@locale": "zh", + "@@locale": "zh-CN", "@@x-reference": true, "accountRoleAssetCashWallet": "现金", "@accountRoleAssetCashWallet": { @@ -1115,4 +1115,4 @@ "@yes": { "description": "The word yes" } -} +} \ No newline at end of file From 382b5267728c5a9642da7541f4aaca801583dab4 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Mon, 14 Oct 2024 17:53:02 +0200 Subject: [PATCH 02/26] New translations full_description.txt (Chinese Simplified) --- fastlane/metadata/android/zh-CN/full_description.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/zh-CN/full_description.txt b/fastlane/metadata/android/zh-CN/full_description.txt index 87d01b7a..81f21d12 100644 --- a/fastlane/metadata/android/zh-CN/full_description.txt +++ b/fastlane/metadata/android/zh-CN/full_description.txt @@ -1,6 +1,6 @@ Waterfly III 是您自己的 Fifly III实例的一个非官方应用,一个免费和开放源码财务管理器。 -这个应用程序需要您自己的服务器上的Frefly III实例。请访问https://www.firefrey-iii.org/ 了解更多有关该软件的信息。 这只是一个配套应用程序,不能独立运行! 这只是一个配套应用程序,不能独立运行! 这只是一个配套应用程序,不能独立运行! 这只是一个配套应用程序,不能独立运行! 这只是一个配套应用程序,不能独立运行! +这个应用程序需要您自己的服务器上的Frefly III实例。请访问https://www.firefrey-iii.org/ 了解更多有关该软件的信息。 这只是一个配套应用程序,不能独立运行! 这只是一个配套应用程序,不能独立运行! 这只是一个配套应用程序,不能独立运行! 这只是一个配套应用程序,不能独立运行! 这只是一个配套应用程序,不能独立运行! 这只是一个配套应用程序,不能独立运行! 特征: From dbba6a32f6d75c778a58a96ebed7cb177ff74c92 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:57:30 +0200 Subject: [PATCH 03/26] New translations full_description.txt (Chinese Simplified) --- fastlane/metadata/android/zh-CN/full_description.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/zh-CN/full_description.txt b/fastlane/metadata/android/zh-CN/full_description.txt index 81f21d12..8aa1c17b 100644 --- a/fastlane/metadata/android/zh-CN/full_description.txt +++ b/fastlane/metadata/android/zh-CN/full_description.txt @@ -1,6 +1,6 @@ Waterfly III 是您自己的 Fifly III实例的一个非官方应用,一个免费和开放源码财务管理器。 -这个应用程序需要您自己的服务器上的Frefly III实例。请访问https://www.firefrey-iii.org/ 了解更多有关该软件的信息。 这只是一个配套应用程序,不能独立运行! 这只是一个配套应用程序,不能独立运行! 这只是一个配套应用程序,不能独立运行! 这只是一个配套应用程序,不能独立运行! 这只是一个配套应用程序,不能独立运行! 这只是一个配套应用程序,不能独立运行! +这个应用程序需要您自己的服务器上的Frefly III实例。请访问https://www.firefrey-iii.org/ 了解更多有关该软件的信息。 这只是一个配套应用程序,不能独立运行! 特征: From 4fdb5cb63ae7dc519c610a77f02389334744c484 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Thu, 17 Oct 2024 16:26:51 +0200 Subject: [PATCH 04/26] New translations app_en.arb (Catalan) --- lib/l10n/app_ca.arb | 278 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 269 insertions(+), 9 deletions(-) diff --git a/lib/l10n/app_ca.arb b/lib/l10n/app_ca.arb index 0c67c8a2..1171e4c2 100644 --- a/lib/l10n/app_ca.arb +++ b/lib/l10n/app_ca.arb @@ -51,6 +51,238 @@ } } }, + "billsAddNewBill": "Afegeix factura", + "@billsAddNewBill": { + "description": "Text for add new bill flows" + }, + "billsAmountAndFrequency": "Factures de transaccions entre {minValue} i {maxvalue}. Es repeteixen {frequency, select, weekly{setmanalment} monthly{mensualment} quarterly{quadrimestralment} halfyear{bianualment} yearly{anualment} other{en altres freqüències}}{skip, plural, one {}=0{} other{, salta a partir de {skip}}}.", + "@billsAmountAndFrequency": { + "description": "Bill match for min and max amounts, and frequency", + "placeholders": { + "minValue": { + "type": "String", + "example": "$50.12" + }, + "maxvalue": { + "type": "String", + "example": "$60.50" + }, + "frequency": { + "type": "String", + "example": "yearly" + }, + "skip": { + "type": "num", + "example": "1" + } + } + }, + "billsChangeLayoutTooltip": "Canvia la disposició", + "@billsChangeLayoutTooltip": { + "description": "Text for layout change button tooltip" + }, + "billsChangeSortOrderTooltip": "Canvia l'ordenació", + "@billsChangeSortOrderTooltip": { + "description": "Text for sort order change button tooltip" + }, + "billsDialogLayoutTitle": "Disposició de vista de factures", + "@billsDialogLayoutTitle": { + "description": "Text for bills layout dialog title" + }, + "billsDialogSortTitle": "Ordena la llista per", + "@billsDialogSortTitle": { + "description": "Text for bills sort dialog title" + }, + "billsEditBill": "Edita la factura", + "@billsEditBill": { + "description": "Text for edit bill flows" + }, + "billsErrorLoading": "Error carregant les factures.", + "@billsErrorLoading": { + "description": "Generic error message when bills can't be loaded (shouldn't occur)" + }, + "billsExactAmountAndFrequency": "Factures de transaccions {value}. Es repeteixen {frequency, select, weekly{setmanalment} monthly{mensualment} quarterly{quadrimestralment} halfyear{bianualment} yearly{anualment} other{en altres freqüències}}{skip, plural, one {}=0{} other{, salta a partir de {skip}}}.", + "@billsExactAmountAndFrequency": { + "description": "Bill match for exact amount and frequency", + "placeholders": { + "value": { + "type": "String", + "example": "$50.12" + }, + "frequency": { + "type": "String", + "example": "yearly" + }, + "skip": { + "type": "num", + "example": "1" + } + } + }, + "billsExpectedOn": "Data estimada {date}", + "@billsExpectedOn": { + "description": "Describes what date the bill is expected", + "placeholders": { + "date": { + "type": "DateTime", + "format": "yMMMMd", + "example": "January 5, 2024" + } + } + }, + "billsFrequency": "{frequency, select, weekly{Setmanal} monthly{Mensual} quarterly{Quadrimestral} halfyear{Bianual} yearly{Anual} other{Altres}}", + "@billsFrequency": { + "description": "Bill frequency", + "placeholders": { + "frequency": { + "type": "String", + "example": "yearly" + } + } + }, + "billsFrequencySkip": "{frequency, select, weekly{Setmanal} monthly{Mensual} quarterly{Qaudrimestral} halfyear{Bianual} yearly{Anual} other{Altres}}{skip, plural, one {}=0{} other{, salta a partir de {skip}}}", + "@billsFrequencySkip": { + "description": "Bill frequency", + "placeholders": { + "frequency": { + "type": "String", + "example": "yearly" + }, + "skip": { + "type": "num", + "example": "1" + } + } + }, + "billsInactive": "Inactiva", + "@billsInactive": { + "description": "Text: when the bill is inactive" + }, + "billsIsActive": "Factura activa", + "@billsIsActive": { + "description": "Text: the bill is active" + }, + "billsLayoutGroupSubtitle": "Factures mostrades als seus grups assignats.", + "@billsLayoutGroupSubtitle": { + "description": "Subtitle text for group layout option" + }, + "billsLayoutGroupTitle": "Grup", + "@billsLayoutGroupTitle": { + "description": "Title text for group layout option" + }, + "billsLayoutListSubtitle": "Factures ordenades segons algun criteri.", + "@billsLayoutListSubtitle": { + "description": "Subtitle text for list layout option" + }, + "billsLayoutListTitle": "Llista", + "@billsLayoutListTitle": { + "description": "Title text for list layout option" + }, + "billsListEmpty": "La llista es troba actualment buida.", + "@billsListEmpty": { + "description": "Describes that the list is empty" + }, + "billsNextExpectedMatch": "Pròxima coincidència esperada", + "@billsNextExpectedMatch": { + "description": "Text: next expected match for bill" + }, + "billsNotActive": "Factura inactiva", + "@billsNotActive": { + "description": "Text: the bill is inactive" + }, + "billsNotExpected": "No s'espera aquest periode", + "@billsNotExpected": { + "description": "Describes that the bill is not expected this period" + }, + "billsNoTransactions": "No s'ha trobat cap transacció.", + "@billsNoTransactions": { + "description": "Describes that there are no transactions connected to the bill" + }, + "billsPaidOn": "Pagada a {date}", + "@billsPaidOn": { + "description": "Describes what date the bill was paid", + "placeholders": { + "date": { + "type": "DateTime", + "format": "yMMMMd", + "example": "January 5, 2024" + } + } + }, + "billsSortAlphabetical": "Alfabètic", + "@billsSortAlphabetical": { + "description": "Text for alphabetical sort types" + }, + "billsSortByTimePeriod": "Per període de temps", + "@billsSortByTimePeriod": { + "description": "Text for frequency sort type" + }, + "billsSortDirection": "{sortDirection, select, ascending{Ascendent} descending{Descendent} other{Indiferent}}", + "@billsSortDirection": { + "description": "Bill sort direction", + "placeholders": { + "sortDirection": { + "type": "String", + "example": "Ascending" + } + } + }, + "billsSortFrequency": "Freqüència", + "@billsSortFrequency": { + "description": "Text for sort by frequency" + }, + "billsSortName": "Nom", + "@billsSortName": { + "description": "Text for sort by name" + }, + "billsUngrouped": "Sense grup", + "@billsUngrouped": { + "description": "Title for ungrouped bills" + }, + "categoryDeleteConfirm": "N'estàs segur que vols esborrar aquesta categoria? Les transaccions no s'esborraran, però ja no tindran cap categoria assignada.", + "@categoryDeleteConfirm": { + "description": "Confirmation text to delete category" + }, + "categoryErrorLoading": "Error al carregar les categories.", + "@categoryErrorLoading": { + "description": "Generic error message when categories can't be loaded (shouldn't occur)" + }, + "categoryFormLabelIncludeInSum": "Inclou a la suma mensual", + "@categoryFormLabelIncludeInSum": { + "description": "Category Add/Edit Form: Label for toggle field to include value in monthly sum" + }, + "categoryFormLabelName": "Nom de la categoria", + "@categoryFormLabelName": { + "description": "Category Add/Edit Form: Label for name field" + }, + "categoryMonthNext": "Mes següent", + "@categoryMonthNext": { + "description": "Button title to view overview for next month" + }, + "categoryMonthPrev": "Mes anterior", + "@categoryMonthPrev": { + "description": "Button title to view overview for previous month" + }, + "categorySumExcluded": "exclosa", + "@categorySumExcluded": { + "description": "Label that the category is excluded from the monthly sum. The label will be shown in the place where usually the monthly percentage share is shown. Should be a single word if possible." + }, + "categoryTitleAdd": "Afegeix Categoria", + "@categoryTitleAdd": { + "description": "Title for Dialog: Add Category" + }, + "categoryTitleDelete": "Esborra la categoria", + "@categoryTitleDelete": { + "description": "Title for Dialog: Delete Category" + }, + "categoryTitleEdit": "Edita la categoria", + "@categoryTitleEdit": { + "description": "Title for Dialog: Edit Category" + }, + "catNone": "", + "@catNone": { + "description": "Placeholder when no category has been set." + }, "catOther": "Altres", "@catOther": { "description": "Category description for summary category 'Other'" @@ -179,6 +411,10 @@ "@generalDismiss": { "description": "Dismiss window/dialog without action" }, + "generalEarned": "Guanyat", + "@generalEarned": { + "description": "(Amount) Earned" + }, "generalError": "Error", "@generalError": { "description": "Error (title in dialogs etc.)" @@ -211,6 +447,10 @@ "@generalReset": { "description": "Reset something (i.e. set filters)" }, + "generalSpent": "Gastat", + "@generalSpent": { + "description": "(Amount) Spent" + }, "generalSum": "Suma", "@generalSum": { "description": "(Mathematical) Sum" @@ -471,6 +711,10 @@ } } }, + "homeTransactionsSettingsShowTags": "Mostra les etiquetes a la llista de transaccions", + "@homeTransactionsSettingsShowTags": { + "description": "Setting label to show tags in transactioon list." + }, "liabilityDirectionCredit": "Se'm deu aquest deute", "@liabilityDirectionCredit": { "description": "Firefly Translation String: liability_direction_credit" @@ -515,6 +759,14 @@ "@navigationAccounts": { "description": "Navigation Label: Accounts Page" }, + "navigationBills": "Factures", + "@navigationBills": { + "description": "Navigation Label: Bills" + }, + "navigationCategories": "Categories", + "@navigationCategories": { + "description": "Navigation Label: Categories" + }, "navigationMain": "Tauler de control Principal", "@navigationMain": { "description": "Navigation Label: Main Dashboard" @@ -523,6 +775,10 @@ "@navigationSettings": { "description": "Navigation Label: Settings" }, + "no": "No", + "@no": { + "description": "The word no" + }, "numPercent": "{num}", "@numPercent": { "description": "Number formatted as percentage", @@ -600,7 +856,7 @@ "@settingsNLAppAccount": { "description": "Default account which will be used for the transaction." }, - "settingsNLAppAccountDynamic": "", + "settingsNLAppAccountDynamic": "", "@settingsNLAppAccountDynamic": { "description": "Account will be selected dynamically by the content of the notification." }, @@ -689,6 +945,14 @@ } } }, + "settingsUseServerTimezone": "Utilitza la zona horària del servidor", + "@settingsUseServerTimezone": { + "description": "Setting label to use server timezone." + }, + "settingsUseServerTimezoneHelp": "Mostra totes les hores a la zona horària del servidor. Això mimetitza el comportament de la interfície web.", + "@settingsUseServerTimezoneHelp": { + "description": "Help text for the server timezone setting. Basically, if enabled, all times shown in the app match the time shown in the webinterface (which is always in the 'home' timezone). Please try to keep the translation short (max 3 lines)." + }, "settingsVersion": "Versió de l'aplicació", "@settingsVersion": { "description": "Current App Version" @@ -697,14 +961,6 @@ "@settingsVersionChecking": { "description": "Shown while checking for app version" }, - "splashCustomSSLCert": "Certificat SSL personalitzat", - "@splashCustomSSLCert": { - "description": "Button text & Dialog title for using a custom SSL certificate" - }, - "splashFormLabelCustomSSLCertPEM": "Fitxer de Certificat (PEM)", - "@splashFormLabelCustomSSLCertPEM": { - "description": "Label for certificate file text input in PEM format" - }, "transactionAttachments": "Adjunts", "@transactionAttachments": { "description": "Button Label: Attachments" @@ -854,5 +1110,9 @@ "transactionTypeWithdrawal": "Retirada", "@transactionTypeWithdrawal": { "description": "Withdrawal transaction type" + }, + "yes": "Sí", + "@yes": { + "description": "The word yes" } } \ No newline at end of file From eafe1a45024f230715c6722fdf038fd0b9dff78e Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Thu, 17 Oct 2024 16:26:54 +0200 Subject: [PATCH 05/26] New translations full_description.txt (Catalan) --- .../android/ca-ES/full_description.txt | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fastlane/metadata/android/ca-ES/full_description.txt b/fastlane/metadata/android/ca-ES/full_description.txt index fbc06fb4..b956b899 100644 --- a/fastlane/metadata/android/ca-ES/full_description.txt +++ b/fastlane/metadata/android/ca-ES/full_description.txt @@ -1,17 +1,17 @@ -Waterfly III és una aplicació no oficial per a la vostra pròpia instància de Firefly III, un gestor financer gratuït i de codi obert. +Waterfly III és una aplicació no oficial per a la teva instància de Firefly III, un gestor de finances gratuït i de codi obert. -Aquesta aplicació requereix una instància de Firefly III autoallotjada al vostre propi servidor, visiteu https://www.firefly-iii.org/ per obtenir més informació sobre el programari. Només és una aplicació de client i no pot funcionar de manera independent! +Aquesta aplicació necessita una instància pròpia de Firefly III, si us plau, visita https://www.firefly-iii.org sobre el programari. Es tracta d'una aplicació complementària que no pot funcionar per si sola! -Funcions: +Característiques: -- Tauler amb gràfics i visió general del pressupost +- Quadre amb resum i gràfics del pressupost - Llista de transaccions amb filtres -- Afegeix i edita transaccions amb autocompleció, incloent-hi adjunts, transaccions partides i suport per a diverses monedes -- Suport per a Guardioles (visualitza i afegeix diners) -- Servei d'escolta de notificacions per crear fàcilment noves transaccions basades en les notificacions entrants (p. ex., de Google Pay o de la vostra aplicació bancària) +- Afegeix i edita transaccions amb autocompletat, inclusió d'adjunts, transaccions fraccionades i suport per múltiples divises +- Suport per a Piggy Bank (veure i afegir diners) +- Servei de Seguiment de Notificacions (Notification Listener Service) per crear noves transaccions fàcilment a partir de les notificacions entrants (p. ex., de Google Pay o l'aplicació del teu banc) - Completament de codi obert: https://github.com/dreautall/waterfly-iii -- Sense anuncis ni rastrejadors +- Sense anuncis monitoratge -Contribució: +Contribuir: -Si trobes algun error o trobes a faltar alguna funció, pots fer propostes a través de Play Store, correu electrònic o GitHub. \ No newline at end of file +Si descobreixes un error o trobes a faltar alguna característica, no dubtis a deixar comentaris a la botiga d'aplicacions, enviar-me un correu electrònic, o obrir una incidència a GitHub. \ No newline at end of file From 87854e1ff99af413b303ae3b4eac01e0b1f0ad80 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Thu, 17 Oct 2024 16:26:57 +0200 Subject: [PATCH 06/26] New translations short_description.txt (Catalan) --- fastlane/metadata/android/ca-ES/short_description.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/ca-ES/short_description.txt b/fastlane/metadata/android/ca-ES/short_description.txt index 9cf4010c..68ffdbab 100644 --- a/fastlane/metadata/android/ca-ES/short_description.txt +++ b/fastlane/metadata/android/ca-ES/short_description.txt @@ -1 +1 @@ -App no-oficial per a Firefly III, un administrador de finances de codi obert. \ No newline at end of file +Aplicació no oficial per a Firefly III, un gestor personal de finances de codi obert. \ No newline at end of file From 51ca167d6871c54eabf4b8d76c2893ac1e95afd8 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Sat, 26 Oct 2024 14:30:55 +0000 Subject: [PATCH 07/26] [pub] upgrade --- pubspec.lock | 84 ++++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 2181dc58..ccdea498 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -218,10 +218,10 @@ packages: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" cronet_http: dependency: "direct main" description: @@ -242,10 +242,10 @@ packages: dependency: transitive description: name: crypto - sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.6" csslib: dependency: transitive description: @@ -322,10 +322,10 @@ packages: dependency: "direct main" description: name: file_picker - sha256: "167bb619cdddaa10ef2907609feb8a79c16dfa479d3afaf960f8e223f754bf12" + sha256: aac85f20436608e01a6ffd1fdd4e746a7f33c93a2c83752e626bdfaea139b877 url: "https://pub.dev" source: hosted - version: "8.1.2" + version: "8.1.3" file_selector_linux: dependency: transitive description: @@ -370,10 +370,10 @@ packages: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -399,10 +399,10 @@ packages: dependency: "direct main" description: name: flutter_local_notifications - sha256: "49eeef364fddb71515bc78d5a8c51435a68bccd6e4d68e25a942c5e47761ae71" + sha256: "674173fd3c9eda9d4c8528da2ce0ea69f161577495a9cc835a2a4ecd7eadeb35" url: "https://pub.dev" source: hosted - version: "17.2.3" + version: "17.2.4" flutter_local_notifications_linux: dependency: transitive description: @@ -428,10 +428,10 @@ packages: dependency: "direct dev" description: name: flutter_native_splash - sha256: aa06fec78de2190f3db4319dd60fdc8d12b2626e93ef9828633928c2dcaea840 + sha256: ee5c9bd2b74ea8676442fd4ab876b5d41681df49276488854d6c81a5377c0ef1 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -598,10 +598,10 @@ packages: dependency: transitive description: name: image - sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8" + sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "4.3.0" image_picker: dependency: "direct main" description: @@ -614,26 +614,26 @@ packages: dependency: transitive description: name: image_picker_android - sha256: d3e5e00fdfeca8fd4ffb3227001264d449cc8950414c2ff70b0e06b9c628e643 + sha256: "8faba09ba361d4b246dc0a17cb4289b3324c2b9f6db7b3d457ee69106a86bd32" url: "https://pub.dev" source: hosted - version: "0.8.12+15" + version: "0.8.12+17" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - sha256: "65d94623e15372c5c51bebbcb820848d7bcb323836e12dfdba60b5d3a8b39e50" + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.6" image_picker_ios: dependency: transitive description: name: image_picker_ios - sha256: "6703696ad49f5c3c8356d576d7ace84d1faf459afb07accbb0fae780753ff447" + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" url: "https://pub.dev" source: hosted - version: "0.8.12" + version: "0.8.12+1" image_picker_linux: dependency: transitive description: @@ -798,10 +798,10 @@ packages: dependency: "direct main" description: name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" macros: dependency: transitive description: @@ -846,10 +846,10 @@ packages: dependency: transitive description: name: mime - sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" url: "https://pub.dev" source: hosted - version: "1.0.6" + version: "2.0.0" mutex: dependency: transitive description: @@ -895,10 +895,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "894f37107424311bdae3e476552229476777b8752c5a2a2369c0cb9a2d5442ef" + sha256: df3eb3e0aed5c1107bb0fdb80a8e82e778114958b1c5ac5644fb1ac9cae8a998 url: "https://pub.dev" source: hosted - version: "8.0.3" + version: "8.1.0" package_info_plus_platform_interface: dependency: transitive description: @@ -919,10 +919,10 @@ packages: dependency: transitive description: name: path_parsing - sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + sha256: "45f7d6bba1128761de5540f39d5ca000ea8a1f22f06b76b61094a60a2997bd0e" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.2" path_provider: dependency: "direct main" description: @@ -983,10 +983,10 @@ packages: dependency: transitive description: name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.1.5" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: @@ -1252,18 +1252,18 @@ packages: dependency: "direct main" description: name: syncfusion_flutter_charts - sha256: "4e89e0893297780d8e06be0c482b9b0a23ecf54c3d64e6e40ff06cf30952bce6" + sha256: "2c52f69e897084d729be724db4cdf19135c80b995754858784222bc55ae82b62" url: "https://pub.dev" source: hosted - version: "27.1.52" + version: "27.1.56" syncfusion_flutter_core: dependency: transitive description: name: syncfusion_flutter_core - sha256: "7130fc3259247946b59fe9b76ee89500c775c3f7e5c1d0826f3105e1dd0bebf6" + sha256: dde81d3a318d914e26b6882051c486b0f5e4fa13e7bc3661741de78f0397fe64 url: "https://pub.dev" source: hosted - version: "27.1.52" + version: "27.1.56" term_glyph: dependency: transitive description: @@ -1308,10 +1308,10 @@ packages: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" universal_io: dependency: transitive description: @@ -1332,10 +1332,10 @@ packages: dependency: transitive description: name: url_launcher_android - sha256: "8fc3bae0b68c02c47c5c86fa8bfa74471d42687b0eded01b78de87872db745e2" + sha256: "0dea215895a4d254401730ca0ba8204b29109a34a99fb06ae559a2b60988d2de" url: "https://pub.dev" source: hosted - version: "6.3.12" + version: "6.3.13" url_launcher_ios: dependency: transitive description: @@ -1380,10 +1380,10 @@ packages: dependency: transitive description: name: url_launcher_windows - sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" vector_graphics: dependency: transitive description: @@ -1476,10 +1476,10 @@ packages: dependency: transitive description: name: win32 - sha256: e5c39a90447e7c81cfec14b041cdbd0d0916bd9ebbc7fe02ab69568be703b9bd + sha256: e1d0cc62e65dc2561f5071fcbccecf58ff20c344f8f3dc7d4922df372a11df1f url: "https://pub.dev" source: hosted - version: "5.6.0" + version: "5.7.1" xdg_directories: dependency: transitive description: From a4bbd6e843b16512d3110cf348722d0b46864791 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Sat, 26 Oct 2024 14:43:03 +0000 Subject: [PATCH 08/26] remove deprecated device_apps package replace with AppCheck --- lib/pages/settings/notifications.dart | 25 +++++++++++++------------ pubspec.lock | 17 +++++++++-------- pubspec.yaml | 5 ++++- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/lib/pages/settings/notifications.dart b/lib/pages/settings/notifications.dart index a893c9e7..6b6fb960 100644 --- a/lib/pages/settings/notifications.dart +++ b/lib/pages/settings/notifications.dart @@ -4,7 +4,7 @@ import 'package:logging/logging.dart'; import 'package:provider/provider.dart'; import 'package:chopper/chopper.dart' show Response; -import 'package:device_apps/device_apps.dart'; +import 'package:appcheck/appcheck.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:notifications_listener_service/notifications_listener_service.dart'; @@ -173,18 +173,18 @@ class _SettingsNotificationsState extends State { onTap: () async { final SettingsProvider settings = context.read(); - Application? app = await showDialog( + AppInfo? app = await showDialog( context: context, builder: (BuildContext context) => const AppDialog(), ); - if (app == null || app.packageName.isEmpty) { + if (app == null || app.appName == null) { return; } await settings.notificationAddUsedApp(app.packageName); await settings.notificationSetAppSettings( app.packageName, - NotificationAppSettings(app.appName), + NotificationAppSettings(app.appName!), ); setState(() {}); }, @@ -453,18 +453,19 @@ class AppDialogEntry extends StatelessWidget { Widget build(BuildContext context) { final Logger log = Logger("Notifications.AppDialog.Entry"); - return FutureBuilder( - future: DeviceApps.getApp(app, true), - builder: (BuildContext context, AsyncSnapshot snapshot) { + return FutureBuilder( + future: AppCheck().checkAvailability(app), + builder: (BuildContext context, AsyncSnapshot snapshot) { if (snapshot.connectionState == ConnectionState.done) { - if (snapshot.data == null) { + if (snapshot.data == null || snapshot.data!.appName == null) { return const SizedBox.shrink(); } late Widget leading; try { - final ApplicationWithIcon appIcon = - snapshot.data! as ApplicationWithIcon; - leading = Image.memory(appIcon.icon); + if (snapshot.data!.icon == null) { + throw Exception(); // will be caught below + } + leading = Image.memory(snapshot.data!.icon!); } catch (e) { leading = const Icon(Icons.api); } @@ -472,7 +473,7 @@ class AppDialogEntry extends StatelessWidget { leading: CircleAvatar( child: leading, ), - title: Text(snapshot.data!.appName), + title: Text(snapshot.data!.appName!), subtitle: Text(app), onTap: () { Navigator.pop(context, snapshot.data); diff --git a/pubspec.lock b/pubspec.lock index ccdea498..b65fdff4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -38,6 +38,15 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + appcheck: + dependency: "direct main" + description: + path: "." + ref: ce371398f86412a8d9a2e0b75a9b51597ea1d79f + resolved-ref: ce371398f86412a8d9a2e0b75a9b51597ea1d79f + url: "https://github.com/bugrevealingbme/AppCheck.git" + source: git + version: "1.5.2" archive: dependency: transitive description: @@ -270,14 +279,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.10" - device_apps: - dependency: "direct main" - description: - name: device_apps - sha256: e84dc74d55749993fd671148cc0bd53096e1be0c268fc364285511b1d8a4c19b - url: "https://pub.dev" - source: hosted - version: "2.2.0" dynamic_color: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index a15da3d5..fae8d8d9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -34,7 +34,10 @@ dependencies: git: url: https://github.com/dreautall/notification_listener_service.git ref: 5f0d49d1b133943a6e6449059712514bf6506fd1 - device_apps: ^2.2.0 + appcheck: + git: + url: https://github.com/bugrevealingbme/AppCheck.git + ref: ce371398f86412a8d9a2e0b75a9b51597ea1d79f package_info_plus: ^8.0.2 logging: ^1.1.1 flutter_email_sender: ^6.0.2 From 1872cf165fde6a2a452c69855bfecdb793da1e0e Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Sat, 26 Oct 2024 16:45:23 +0200 Subject: [PATCH 09/26] Update app_zh.arb --- lib/l10n/app_zh.arb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index 5739f6f2..b30466db 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -1,5 +1,5 @@ { - "@@locale": "zh-CN", + "@@locale": "zh", "@@x-reference": true, "accountRoleAssetCashWallet": "现金", "@accountRoleAssetCashWallet": { @@ -1115,4 +1115,4 @@ "@yes": { "description": "The word yes" } -} \ No newline at end of file +} From 46bfa768fc450cad475337ce1ed69c7955cd1a0f Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Sat, 26 Oct 2024 16:31:22 +0000 Subject: [PATCH 10/26] refresh Main Page Charts when transactions are updated fixes #456 --- lib/pages/home/main.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/pages/home/main.dart b/lib/pages/home/main.dart index 24af8a1a..2b3a2652 100644 --- a/lib/pages/home/main.dart +++ b/lib/pages/home/main.dart @@ -54,8 +54,17 @@ class _HomeMainState extends State final List catChartData = []; final Map budgetInfos = {}; + @override + void initState() { + super.initState(); + + context.read().transStock!.addListener(_refreshStats); + } + @override void dispose() { + context.read().transStock!.removeListener(_refreshStats); + super.dispose(); } From ff61cb4c288a2c34fb4a5589f7026343148f3904 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Sat, 26 Oct 2024 17:56:10 +0000 Subject: [PATCH 11/26] fix for #469 crashing on tab change --- lib/pages/home/main.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/pages/home/main.dart b/lib/pages/home/main.dart index 2b3a2652..bc609bee 100644 --- a/lib/pages/home/main.dart +++ b/lib/pages/home/main.dart @@ -26,6 +26,7 @@ import 'package:waterflyiii/pages/home/main_charts/lastdays.dart'; import 'package:waterflyiii/pages/home/main_charts/netearnings.dart'; import 'package:waterflyiii/pages/home/main_charts/networth.dart'; import 'package:waterflyiii/pages/home/main_charts/summary.dart'; +import 'package:waterflyiii/stock.dart'; import 'package:waterflyiii/timezonehandler.dart'; import 'package:waterflyiii/widgets/charts.dart'; @@ -53,17 +54,19 @@ class _HomeMainState extends State List overviewChartData = []; final List catChartData = []; final Map budgetInfos = {}; + late TransStock _stock; @override void initState() { super.initState(); - context.read().transStock!.addListener(_refreshStats); + _stock = context.read().transStock!; + _stock.addListener(_refreshStats); } @override void dispose() { - context.read().transStock!.removeListener(_refreshStats); + _stock.removeListener(_refreshStats); super.dispose(); } From acc918dc8f80c868a3350ce12cb6e27ae8928ff0 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Sat, 26 Oct 2024 18:11:26 +0000 Subject: [PATCH 12/26] framework base for editing account name --- lib/pages/home/accounts/row.dart | 68 ++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 13 deletions(-) diff --git a/lib/pages/home/accounts/row.dart b/lib/pages/home/accounts/row.dart index d1b0f50f..dbfbddce 100644 --- a/lib/pages/home/accounts/row.dart +++ b/lib/pages/home/accounts/row.dart @@ -93,19 +93,8 @@ Widget accountRowBuilder(BuildContext context, AccountRead account, int index) { subtitle = S.of(context).generalUnknown; } return OpenContainer( - openBuilder: (BuildContext context, Function closedContainer) => Scaffold( - appBar: AppBar( - title: Text(account.attributes.name), - ), - floatingActionButton: - account.attributes.type == ShortAccountTypeProperty.asset - ? NewTransactionFab( - context: context, - accountId: account.id, - ) - : null, - body: HomeTransactions(accountId: account.id), - ), + openBuilder: (BuildContext context, Function closedContainer) => + AccountTXpage(account: account), openColor: Theme.of(context).cardColor, closedColor: Theme.of(context).cardColor, closedShape: const RoundedRectangleBorder( @@ -166,3 +155,56 @@ Widget accountRowBuilder(BuildContext context, AccountRead account, int index) { ), ); } + +class AccountTXpage extends StatefulWidget { + const AccountTXpage({ + super.key, + required this.account, + }); + + final AccountRead account; + + @override + State createState() => _AccountTXpageState(); +} + +class _AccountTXpageState extends State { + late Widget _titleWidget; + + @override + void initState() { + super.initState(); + + _titleWidget = Text(widget.account.attributes.name); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: _titleWidget, + actions: [ + IconButton( + icon: Icon(Icons.edit), + onPressed: () { + debugPrint("hi3"); + setState(() { + _titleWidget = TextFormField( + initialValue: widget.account.attributes.name, + ); + }); + }, + ) + ], + ), + floatingActionButton: + widget.account.attributes.type == ShortAccountTypeProperty.asset + ? NewTransactionFab( + context: context, + accountId: widget.account.id, + ) + : null, + body: HomeTransactions(accountId: widget.account.id), + ); + } +} From 5f98f658ee837d4b86a82643382177931da2d80f Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Sat, 26 Oct 2024 18:32:56 +0000 Subject: [PATCH 13/26] basic field functionality --- lib/pages/home/accounts/row.dart | 69 +++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 11 deletions(-) diff --git a/lib/pages/home/accounts/row.dart b/lib/pages/home/accounts/row.dart index dbfbddce..2371f456 100644 --- a/lib/pages/home/accounts/row.dart +++ b/lib/pages/home/accounts/row.dart @@ -2,7 +2,10 @@ import 'package:animations/animations.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:intl/intl.dart'; +import 'package:logging/logging.dart'; +import 'package:provider/provider.dart'; +import 'package:waterflyiii/auth.dart'; import 'package:waterflyiii/extensions.dart'; import 'package:waterflyiii/generated/swagger_fireflyiii_api/firefly_iii.swagger.dart'; import 'package:waterflyiii/pages/home/transactions.dart'; @@ -169,13 +172,67 @@ class AccountTXpage extends StatefulWidget { } class _AccountTXpageState extends State { + final Logger log = Logger("Pages.Accounts.Row.Page"); + late Widget _titleWidget; + late Widget _editIcon; + + final TextEditingController _textController = TextEditingController(); + final FocusNode _focusNode = FocusNode(); @override void initState() { super.initState(); _titleWidget = Text(widget.account.attributes.name); + _editIcon = IconButton( + icon: Icon(Icons.edit), + onPressed: showTextfield, + ); + } + + @override + void dispose() { + _textController.dispose(); + _focusNode.dispose(); + + super.dispose(); + } + + void showTextfield() { + log.finest(() => "showing edit field"); + setState(() { + _textController.text = widget.account.attributes.name; + _titleWidget = TextField( + controller: _textController, + focusNode: _focusNode, + onEditingComplete: submitTextfield, + ); + _editIcon = IconButton( + icon: Icon(Icons.check), + onPressed: submitTextfield, + ); + + _focusNode.requestFocus(); + }); + } + + void submitTextfield() { + log.finest(() => "submitting edit field"); + if (_textController.text.isEmpty || + _textController.text == widget.account.attributes.name) { + log.finest(() => "edit aborted"); + setState(() { + _titleWidget = Text(widget.account.attributes.name); + _editIcon = IconButton( + icon: Icon(Icons.edit), + onPressed: showTextfield, + ); + }); + return; + } + + final FireflyIii api = context.read().api; } @override @@ -184,17 +241,7 @@ class _AccountTXpageState extends State { appBar: AppBar( title: _titleWidget, actions: [ - IconButton( - icon: Icon(Icons.edit), - onPressed: () { - debugPrint("hi3"); - setState(() { - _titleWidget = TextFormField( - initialValue: widget.account.attributes.name, - ); - }); - }, - ) + _editIcon, ], ), floatingActionButton: From 911bca15fb5e7e4f57164af2f423f07ea8656621 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Sat, 26 Oct 2024 18:51:22 +0000 Subject: [PATCH 14/26] complete edit functionality --- lib/pages/home/accounts/row.dart | 40 +++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/lib/pages/home/accounts/row.dart b/lib/pages/home/accounts/row.dart index 2371f456..eb9683b9 100644 --- a/lib/pages/home/accounts/row.dart +++ b/lib/pages/home/accounts/row.dart @@ -5,6 +5,8 @@ import 'package:intl/intl.dart'; import 'package:logging/logging.dart'; import 'package:provider/provider.dart'; +import 'package:chopper/chopper.dart'; + import 'package:waterflyiii/auth.dart'; import 'package:waterflyiii/extensions.dart'; import 'package:waterflyiii/generated/swagger_fireflyiii_api/firefly_iii.swagger.dart'; @@ -174,6 +176,7 @@ class AccountTXpage extends StatefulWidget { class _AccountTXpageState extends State { final Logger log = Logger("Pages.Accounts.Row.Page"); + late String _name; late Widget _titleWidget; late Widget _editIcon; @@ -184,7 +187,8 @@ class _AccountTXpageState extends State { void initState() { super.initState(); - _titleWidget = Text(widget.account.attributes.name); + _name = widget.account.attributes.name; + _titleWidget = Text(_name); _editIcon = IconButton( icon: Icon(Icons.edit), onPressed: showTextfield, @@ -217,22 +221,32 @@ class _AccountTXpageState extends State { }); } - void submitTextfield() { + void submitTextfield() async { log.finest(() => "submitting edit field"); - if (_textController.text.isEmpty || - _textController.text == widget.account.attributes.name) { - log.finest(() => "edit aborted"); - setState(() { - _titleWidget = Text(widget.account.attributes.name); - _editIcon = IconButton( - icon: Icon(Icons.edit), - onPressed: showTextfield, + if (_textController.text.isNotEmpty && + _textController.text != widget.account.attributes.name) { + try { + final FireflyIii api = context.read().api; + final Response response = await api.v1AccountsIdPut( + id: widget.account.id, + body: AccountUpdate(name: _textController.text), ); - }); - return; + apiThrowErrorIfEmpty(response, mounted ? context : null); + + _name = response.body!.data.attributes.name; + } catch (e, stackTrace) { + log.severe("Error while submitting new name to API", e, stackTrace); + } } - final FireflyIii api = context.read().api; + log.finest(() => "switching back to text field"); + setState(() { + _titleWidget = Text(_name); + _editIcon = IconButton( + icon: Icon(Icons.edit), + onPressed: showTextfield, + ); + }); } @override From 25dae82abce44a1167a8720f14122b07df62ac8a Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Sat, 26 Oct 2024 19:01:30 +0000 Subject: [PATCH 15/26] add refresh functionality --- lib/pages/accounts.dart | 3 ++- lib/pages/home/accounts/row.dart | 19 ++++++++++++++++--- lib/pages/home/accounts/search.dart | 9 ++++++++- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/lib/pages/accounts.dart b/lib/pages/accounts.dart index 2aafc85d..a7774ba7 100644 --- a/lib/pages/accounts.dart +++ b/lib/pages/accounts.dart @@ -199,7 +199,8 @@ class _AccountDetailsState extends State child: PagedListView( pagingController: _pagingController, builderDelegate: PagedChildBuilderDelegate( - itemBuilder: accountRowBuilder, + itemBuilder: (BuildContext context, AccountRead item, int index) => + accountRowBuilder(context, item, index, _pagingController), ), ), ); diff --git a/lib/pages/home/accounts/row.dart b/lib/pages/home/accounts/row.dart index eb9683b9..7f26e6c7 100644 --- a/lib/pages/home/accounts/row.dart +++ b/lib/pages/home/accounts/row.dart @@ -6,6 +6,7 @@ import 'package:logging/logging.dart'; import 'package:provider/provider.dart'; import 'package:chopper/chopper.dart'; +import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart'; import 'package:waterflyiii/auth.dart'; import 'package:waterflyiii/extensions.dart'; @@ -13,7 +14,13 @@ import 'package:waterflyiii/generated/swagger_fireflyiii_api/firefly_iii.swagger import 'package:waterflyiii/pages/home/transactions.dart'; import 'package:waterflyiii/widgets/fabs.dart'; -Widget accountRowBuilder(BuildContext context, AccountRead account, int index) { +Widget accountRowBuilder( + BuildContext context, + AccountRead account, + int index, + PagingController pagingController, +) { + String name = account.attributes.name; late double currentAmount; if (account.attributes.type == ShortAccountTypeProperty.liability) { currentAmount = double.tryParse(account.attributes.currentDebt ?? "") ?? 0; @@ -99,7 +106,10 @@ Widget accountRowBuilder(BuildContext context, AccountRead account, int index) { } return OpenContainer( openBuilder: (BuildContext context, Function closedContainer) => - AccountTXpage(account: account), + AccountTXpage( + account: account, + nameUpdateFunc: (_) => pagingController.refresh(), + ), openColor: Theme.of(context).cardColor, closedColor: Theme.of(context).cardColor, closedShape: const RoundedRectangleBorder( @@ -111,7 +121,7 @@ Widget accountRowBuilder(BuildContext context, AccountRead account, int index) { closedElevation: 0, closedBuilder: (BuildContext context, Function openContainer) => ListTile( title: Text( - account.attributes.name, + name, maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -165,9 +175,11 @@ class AccountTXpage extends StatefulWidget { const AccountTXpage({ super.key, required this.account, + required this.nameUpdateFunc, }); final AccountRead account; + final Function(String) nameUpdateFunc; @override State createState() => _AccountTXpageState(); @@ -234,6 +246,7 @@ class _AccountTXpageState extends State { apiThrowErrorIfEmpty(response, mounted ? context : null); _name = response.body!.data.attributes.name; + widget.nameUpdateFunc(_name); } catch (e, stackTrace) { log.severe("Error while submitting new name to API", e, stackTrace); } diff --git a/lib/pages/home/accounts/search.dart b/lib/pages/home/accounts/search.dart index f76817e8..fe19bed4 100644 --- a/lib/pages/home/accounts/search.dart +++ b/lib/pages/home/accounts/search.dart @@ -200,7 +200,14 @@ class _AccountSearchState extends State { ? PagedListView( pagingController: _pagingController, builderDelegate: PagedChildBuilderDelegate( - itemBuilder: accountRowBuilder, + itemBuilder: + (BuildContext context, AccountRead item, int index) => + accountRowBuilder( + context, + item, + index, + _pagingController, + ), ), ) : const SizedBox.expand(), From 02a0d4f9c5db26f5bbd7d2ba50bb3d263c15e567 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Sat, 26 Oct 2024 19:07:28 +0000 Subject: [PATCH 16/26] better error handling --- lib/pages/home/accounts/row.dart | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/lib/pages/home/accounts/row.dart b/lib/pages/home/accounts/row.dart index 7f26e6c7..9f47ff0b 100644 --- a/lib/pages/home/accounts/row.dart +++ b/lib/pages/home/accounts/row.dart @@ -1,3 +1,5 @@ +import 'dart:convert'; + import 'package:animations/animations.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -235,6 +237,8 @@ class _AccountTXpageState extends State { void submitTextfield() async { log.finest(() => "submitting edit field"); + final ScaffoldMessengerState msg = ScaffoldMessenger.of(context); + if (_textController.text.isNotEmpty && _textController.text != widget.account.attributes.name) { try { @@ -243,7 +247,33 @@ class _AccountTXpageState extends State { id: widget.account.id, body: AccountUpdate(name: _textController.text), ); - apiThrowErrorIfEmpty(response, mounted ? context : null); + if (!response.isSuccessful || response.body == null) { + log.severe("Error while submitting new name to API"); + String error; + try { + ValidationErrorResponse valError = ValidationErrorResponse.fromJson( + json.decode(response.error.toString()), + ); + error = valError.message ?? + // ignore: use_build_context_synchronously + (context.mounted + // ignore: use_build_context_synchronously + ? S.of(context).errorUnknown + : "[nocontext] Unknown error."); + } catch (_) { + // ignore: use_build_context_synchronously + error = context.mounted + // ignore: use_build_context_synchronously + ? S.of(context).errorUnknown + : "[nocontext] Unknown error."; + } + + msg.showSnackBar(SnackBar( + content: Text(error), + behavior: SnackBarBehavior.floating, + )); + return; + } _name = response.body!.data.attributes.name; widget.nameUpdateFunc(_name); From d65f3006da141cedb0213a2ccfc834b67b630f85 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Sun, 27 Oct 2024 06:46:16 +0000 Subject: [PATCH 17/26] disable x84_64 builds due to issues in Google Play --- .github/workflows/release.yml | 9 --------- android/app/build.gradle | 11 ++++++++++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a55998c8..99c99e96 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,10 +69,6 @@ jobs: with: name: app-armeabi-v7a-release.apk path: build/app/outputs/apk/release/app-armeabi-v7a-release.apk - - uses: actions/upload-artifact@v4 - with: - name: app-x86_64-release.apk - path: build/app/outputs/flutter-apk/app-x86_64-release.apk - uses: actions/upload-artifact@v4 with: @@ -101,17 +97,12 @@ jobs: with: name: app-armeabi-v7a-release.apk path: ./artifacts - - uses: actions/download-artifact@v4 - with: - name: app-x86_64-release.apk - path: ./artifacts - uses: softprops/action-gh-release@v2 with: files: | ./artifacts/app-arm64-v8a-release.apk ./artifacts/app-armeabi-v7a-release.apk - ./artifacts/app-x86_64-release.apk deploy: runs-on: ubuntu-latest diff --git a/android/app/build.gradle b/android/app/build.gradle index 4c4404ec..99b62a26 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -90,6 +90,15 @@ android { // Disables dependency metadata when building Android App Bundles. includeInBundle = false } + + splits { + abi { + enable true + + reset() + include 'armeabi-v7a', 'arm64-v8a' + } + } } flutter { @@ -106,7 +115,7 @@ dependencies { implementation 'androidx.window:window-java:1.1.0-rc01' // Added: flutter_local_notifications } -ext.abiCodes = ["x86_64": 1, "armeabi-v7a": 2, "arm64-v8a": 3] +ext.abiCodes = ["armeabi-v7a": 2, "arm64-v8a": 3] import com.android.build.OutputFile android.applicationVariants.all { variant -> variant.outputs.each { output -> From bef2403c00143e57a5eef01c75c3af29423a214c Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Sun, 27 Oct 2024 10:52:53 +0000 Subject: [PATCH 18/26] fix for build --- .github/workflows/release.yml | 4 ++-- android/app/build.gradle | 11 +---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99c99e96..56f47c09 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,11 +49,11 @@ jobs: sed -i 's/^\(version: [0-9\.]\{1,\}\(-[a-z]\{1,\}\)\{0,1\}\)$/\1+${{ github.run_number }}/m' pubspec.yaml # Build apk. - - run: flutter build apk --obfuscate --split-debug-info=build/app/outputs/symbols/apk --release --split-per-abi --dart-define=cronetHttpNoPlay=true + - run: flutter build apk --target-platform=android-arm,android-arm64 --obfuscate --split-debug-info=build/app/outputs/symbols/apk --release --split-per-abi --dart-define=cronetHttpNoPlay=true # Build aab # Since the aab is only distributed to the play store and never uploaded somewhere else, we can use the Google Play Services cronet here. - - run: flutter build appbundle --obfuscate --split-debug-info=build/app/outputs/symbols/aab --release + - run: flutter build appbundle --target-platform=android-arm,android-arm64 --obfuscate --split-debug-info=build/app/outputs/symbols/aab --release # Zip symbols - uses: montudor/action-zip@v1 diff --git a/android/app/build.gradle b/android/app/build.gradle index 99b62a26..4c4404ec 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -90,15 +90,6 @@ android { // Disables dependency metadata when building Android App Bundles. includeInBundle = false } - - splits { - abi { - enable true - - reset() - include 'armeabi-v7a', 'arm64-v8a' - } - } } flutter { @@ -115,7 +106,7 @@ dependencies { implementation 'androidx.window:window-java:1.1.0-rc01' // Added: flutter_local_notifications } -ext.abiCodes = ["armeabi-v7a": 2, "arm64-v8a": 3] +ext.abiCodes = ["x86_64": 1, "armeabi-v7a": 2, "arm64-v8a": 3] import com.android.build.OutputFile android.applicationVariants.all { variant -> variant.outputs.each { output -> From 2108b3b4cef228dd2283f762ae003edecfe80616 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Mon, 4 Nov 2024 20:06:52 +0000 Subject: [PATCH 19/26] [pub] upgrade --- pubspec.lock | 64 ++++++++++++++++++++++++++-------------------------- pubspec.yaml | 2 +- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index b65fdff4..1b018b0c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -195,10 +195,10 @@ packages: dependency: transitive description: name: code_builder - sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" url: "https://pub.dev" source: hosted - version: "4.10.0" + version: "4.10.1" collection: dependency: "direct main" description: @@ -259,10 +259,10 @@ packages: dependency: transitive description: name: csslib - sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.2" dart_style: dependency: transitive description: @@ -400,26 +400,26 @@ packages: dependency: "direct main" description: name: flutter_local_notifications - sha256: "674173fd3c9eda9d4c8528da2ce0ea69f161577495a9cc835a2a4ecd7eadeb35" + sha256: "725145682706fb0e5a30f93e5cb64f3df7ed7743de749bd555b22bf75ee718c0" url: "https://pub.dev" source: hosted - version: "17.2.4" + version: "18.0.0" flutter_local_notifications_linux: dependency: transitive description: name: flutter_local_notifications_linux - sha256: c49bd06165cad9beeb79090b18cd1eb0296f4bf4b23b84426e37dd7c027fc3af + sha256: "8f685642876742c941b29c32030f6f4f6dacd0e4eaecb3efbb187d6a3812ca01" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "5.0.0" flutter_local_notifications_platform_interface: dependency: transitive description: name: flutter_local_notifications_platform_interface - sha256: "85f8d07fe708c1bdcf45037f2c0109753b26ae077e9d9e899d55971711a4ea66" + sha256: "6c5b83c86bf819cdb177a9247a3722067dd8cc6313827ce7c77a4b238a26fd52" url: "https://pub.dev" source: hosted - version: "7.2.0" + version: "8.0.0" flutter_localizations: dependency: "direct main" description: flutter @@ -509,10 +509,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" + sha256: "1b7723a814d84fb65869ea7115cdb3ee7c3be5a27a755c1ec60e049f6b9fcbb2" url: "https://pub.dev" source: hosted - version: "2.0.10+1" + version: "2.0.11" flutter_test: dependency: transitive description: flutter @@ -559,10 +559,10 @@ packages: dependency: transitive description: name: html - sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" url: "https://pub.dev" source: hosted - version: "0.15.4" + version: "0.15.5" http: dependency: "direct main" description: @@ -920,18 +920,18 @@ packages: dependency: transitive description: name: path_parsing - sha256: "45f7d6bba1128761de5540f39d5ca000ea8a1f22f06b76b61094a60a2997bd0e" + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" path_provider: dependency: "direct main" description: name: path_provider - sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" path_provider_android: dependency: transitive description: @@ -1253,18 +1253,18 @@ packages: dependency: "direct main" description: name: syncfusion_flutter_charts - sha256: "2c52f69e897084d729be724db4cdf19135c80b995754858784222bc55ae82b62" + sha256: "977a6bbf67b542e8b59566b9963f1c3c270feae7737f9c85891c3ad81a40dd53" url: "https://pub.dev" source: hosted - version: "27.1.56" + version: "27.1.57" syncfusion_flutter_core: dependency: transitive description: name: syncfusion_flutter_core - sha256: dde81d3a318d914e26b6882051c486b0f5e4fa13e7bc3661741de78f0397fe64 + sha256: "6a2445aef2adc77136aedaf8b0c1b7f22c43b43d7036f219414db9acd679570a" url: "https://pub.dev" source: hosted - version: "27.1.56" + version: "27.1.57" term_glyph: dependency: transitive description: @@ -1333,10 +1333,10 @@ packages: dependency: transitive description: name: url_launcher_android - sha256: "0dea215895a4d254401730ca0ba8204b29109a34a99fb06ae559a2b60988d2de" + sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193" url: "https://pub.dev" source: hosted - version: "6.3.13" + version: "6.3.14" url_launcher_ios: dependency: transitive description: @@ -1389,26 +1389,26 @@ packages: dependency: transitive description: name: vector_graphics - sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" + sha256: "0b9149c6ddb013818075b072b9ddc1b89a5122fff1275d4648d297086b46c4f0" url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.12" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da + sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb" url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.12" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" + sha256: f3b9b6e4591c11394d4be4806c63e72d3a41778547b2c1e2a8a04fadcfd7d173 url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.12" vector_math: dependency: transitive description: @@ -1477,10 +1477,10 @@ packages: dependency: transitive description: name: win32 - sha256: e1d0cc62e65dc2561f5071fcbccecf58ff20c344f8f3dc7d4922df372a11df1f + sha256: "84ba388638ed7a8cb3445a320c8273136ab2631cd5f2c57888335504ddab1bc2" url: "https://pub.dev" source: hosted - version: "5.7.1" + version: "5.8.0" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index fae8d8d9..0c1e2f9b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -29,7 +29,7 @@ dependencies: community_charts_flutter: ^1.0.2 file_picker: ^8.1.2 animations: ^2.0.11 - flutter_local_notifications: ^17.2.3 + flutter_local_notifications: ^18.0.0 notifications_listener_service: git: url: https://github.com/dreautall/notification_listener_service.git From 7282e399b4440132c321559acc0357a553015c7c Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Mon, 4 Nov 2024 20:27:50 +0000 Subject: [PATCH 20/26] Revert "fix for build" This reverts commit bef2403c00143e57a5eef01c75c3af29423a214c. --- .github/workflows/release.yml | 4 ++-- android/app/build.gradle | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 56f47c09..99c99e96 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,11 +49,11 @@ jobs: sed -i 's/^\(version: [0-9\.]\{1,\}\(-[a-z]\{1,\}\)\{0,1\}\)$/\1+${{ github.run_number }}/m' pubspec.yaml # Build apk. - - run: flutter build apk --target-platform=android-arm,android-arm64 --obfuscate --split-debug-info=build/app/outputs/symbols/apk --release --split-per-abi --dart-define=cronetHttpNoPlay=true + - run: flutter build apk --obfuscate --split-debug-info=build/app/outputs/symbols/apk --release --split-per-abi --dart-define=cronetHttpNoPlay=true # Build aab # Since the aab is only distributed to the play store and never uploaded somewhere else, we can use the Google Play Services cronet here. - - run: flutter build appbundle --target-platform=android-arm,android-arm64 --obfuscate --split-debug-info=build/app/outputs/symbols/aab --release + - run: flutter build appbundle --obfuscate --split-debug-info=build/app/outputs/symbols/aab --release # Zip symbols - uses: montudor/action-zip@v1 diff --git a/android/app/build.gradle b/android/app/build.gradle index 4c4404ec..99b62a26 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -90,6 +90,15 @@ android { // Disables dependency metadata when building Android App Bundles. includeInBundle = false } + + splits { + abi { + enable true + + reset() + include 'armeabi-v7a', 'arm64-v8a' + } + } } flutter { @@ -106,7 +115,7 @@ dependencies { implementation 'androidx.window:window-java:1.1.0-rc01' // Added: flutter_local_notifications } -ext.abiCodes = ["x86_64": 1, "armeabi-v7a": 2, "arm64-v8a": 3] +ext.abiCodes = ["armeabi-v7a": 2, "arm64-v8a": 3] import com.android.build.OutputFile android.applicationVariants.all { variant -> variant.outputs.each { output -> From 9d666c57f97144a8dd5eb90655492c144afc430f Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Mon, 4 Nov 2024 20:28:03 +0000 Subject: [PATCH 21/26] Revert "disable x84_64 builds due to issues in Google Play" This reverts commit d65f3006da141cedb0213a2ccfc834b67b630f85. --- .github/workflows/release.yml | 9 +++++++++ android/app/build.gradle | 11 +---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99c99e96..a55998c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,6 +69,10 @@ jobs: with: name: app-armeabi-v7a-release.apk path: build/app/outputs/apk/release/app-armeabi-v7a-release.apk + - uses: actions/upload-artifact@v4 + with: + name: app-x86_64-release.apk + path: build/app/outputs/flutter-apk/app-x86_64-release.apk - uses: actions/upload-artifact@v4 with: @@ -97,12 +101,17 @@ jobs: with: name: app-armeabi-v7a-release.apk path: ./artifacts + - uses: actions/download-artifact@v4 + with: + name: app-x86_64-release.apk + path: ./artifacts - uses: softprops/action-gh-release@v2 with: files: | ./artifacts/app-arm64-v8a-release.apk ./artifacts/app-armeabi-v7a-release.apk + ./artifacts/app-x86_64-release.apk deploy: runs-on: ubuntu-latest diff --git a/android/app/build.gradle b/android/app/build.gradle index 99b62a26..4c4404ec 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -90,15 +90,6 @@ android { // Disables dependency metadata when building Android App Bundles. includeInBundle = false } - - splits { - abi { - enable true - - reset() - include 'armeabi-v7a', 'arm64-v8a' - } - } } flutter { @@ -115,7 +106,7 @@ dependencies { implementation 'androidx.window:window-java:1.1.0-rc01' // Added: flutter_local_notifications } -ext.abiCodes = ["armeabi-v7a": 2, "arm64-v8a": 3] +ext.abiCodes = ["x86_64": 1, "armeabi-v7a": 2, "arm64-v8a": 3] import com.android.build.OutputFile android.applicationVariants.all { variant -> variant.outputs.each { output -> From 52db70fc9becf7f56f9c457d00a9f3531aa8b1d3 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Mon, 11 Nov 2024 19:07:32 +0000 Subject: [PATCH 22/26] [pub] upgrade --- pubspec.lock | 56 ++++++++++++++++++++++++++-------------------------- pubspec.yaml | 2 +- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 1b018b0c..cb9fc585 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -323,18 +323,18 @@ packages: dependency: "direct main" description: name: file_picker - sha256: aac85f20436608e01a6ffd1fdd4e746a7f33c93a2c83752e626bdfaea139b877 + sha256: "16dc141db5a2ccc6520ebb6a2eb5945b1b09e95085c021d9f914f8ded7f1465c" url: "https://pub.dev" source: hosted - version: "8.1.3" + version: "8.1.4" file_selector_linux: dependency: transitive description: name: file_selector_linux - sha256: "712ce7fab537ba532c8febdb1a8f167b32441e74acd68c3ccb2e36dcb52c4ab2" + sha256: b2b91daf8a68ecfa4a01b778a6f52edef9b14ecd506e771488ea0f2e0784198b url: "https://pub.dev" source: hosted - version: "0.9.3" + version: "0.9.3+1" file_selector_macos: dependency: transitive description: @@ -400,10 +400,10 @@ packages: dependency: "direct main" description: name: flutter_local_notifications - sha256: "725145682706fb0e5a30f93e5cb64f3df7ed7743de749bd555b22bf75ee718c0" + sha256: ef41ae901e7529e52934feba19ed82827b11baa67336829564aeab3129460610 url: "https://pub.dev" source: hosted - version: "18.0.0" + version: "18.0.1" flutter_local_notifications_linux: dependency: transitive description: @@ -509,10 +509,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: "1b7723a814d84fb65869ea7115cdb3ee7c3be5a27a755c1ec60e049f6b9fcbb2" + sha256: "578bd8c508144fdaffd4f77b8ef2d8c523602275cd697cc3db284dbd762ef4ce" url: "https://pub.dev" source: hosted - version: "2.0.11" + version: "2.0.14" flutter_test: dependency: transitive description: flutter @@ -671,10 +671,10 @@ packages: dependency: "direct main" description: name: infinite_scroll_pagination - sha256: b68bce20752fcf36c7739e60de4175494f74e99e9a69b4dd2fe3a1dd07a7f16a + sha256: "4047eb8191e8b33573690922a9e995af64c3949dc87efc844f936b039ea279df" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.1.0" intl: dependency: "direct main" description: @@ -896,10 +896,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: df3eb3e0aed5c1107bb0fdb80a8e82e778114958b1c5ac5644fb1ac9cae8a998 + sha256: da8d9ac8c4b1df253d1a328b7bf01ae77ef132833479ab40763334db13b91cce url: "https://pub.dev" source: hosted - version: "8.1.0" + version: "8.1.1" package_info_plus_platform_interface: dependency: transitive description: @@ -1088,18 +1088,18 @@ packages: dependency: transitive description: name: rxdart - sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" + sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962" url: "https://pub.dev" source: hosted - version: "0.27.7" + version: "0.28.0" shared_preferences: dependency: "direct main" description: name: shared_preferences - sha256: "746e5369a43170c25816cc472ee016d3a66bc13fcf430c0bc41ad7b4b2922051" + sha256: "95f9997ca1fb9799d494d0cb2a780fd7be075818d59f00c43832ed112b158a82" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.3.3" shared_preferences_android: dependency: transitive description: @@ -1213,10 +1213,10 @@ packages: dependency: "direct main" description: name: stock - sha256: "43a1c693a0d6adb51c1acdb4f3141532a95aa887650b1c1dae5bbd96c228cb6a" + sha256: f73f15ab71c902cf80db588981963f69a9449eefec0247c6c2b2e01951d5e27c url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" stream_channel: dependency: transitive description: @@ -1253,18 +1253,18 @@ packages: dependency: "direct main" description: name: syncfusion_flutter_charts - sha256: "977a6bbf67b542e8b59566b9963f1c3c270feae7737f9c85891c3ad81a40dd53" + sha256: e97025be6a68d358463dcf0a83b3c600c52e14574c754b331aac5d1cbb86c759 url: "https://pub.dev" source: hosted - version: "27.1.57" + version: "27.1.58" syncfusion_flutter_core: dependency: transitive description: name: syncfusion_flutter_core - sha256: "6a2445aef2adc77136aedaf8b0c1b7f22c43b43d7036f219414db9acd679570a" + sha256: "31d2ddf410ee41abb3ecf85b7b6e8e1563307ad52ee784ddd91337e30280f715" url: "https://pub.dev" source: hosted - version: "27.1.57" + version: "27.1.58" term_glyph: dependency: transitive description: @@ -1285,10 +1285,10 @@ packages: dependency: "direct main" description: name: timezone - sha256: "2236ec079a174ce07434e89fcd3fcda430025eb7692244139a9cf54fdcf1fc7d" + sha256: ffc9d5f4d1193534ef051f9254063fa53d588609418c84299956c3db9383587d url: "https://pub.dev" source: hosted - version: "0.9.4" + version: "0.10.0" timing: dependency: transitive description: @@ -1389,10 +1389,10 @@ packages: dependency: transitive description: name: vector_graphics - sha256: "0b9149c6ddb013818075b072b9ddc1b89a5122fff1275d4648d297086b46c4f0" + sha256: "773c9522d66d523e1c7b25dfb95cc91c26a1e17b107039cfe147285e92de7878" url: "https://pub.dev" source: hosted - version: "1.1.12" + version: "1.1.14" vector_graphics_codec: dependency: transitive description: @@ -1405,10 +1405,10 @@ packages: dependency: transitive description: name: vector_graphics_compiler - sha256: f3b9b6e4591c11394d4be4806c63e72d3a41778547b2c1e2a8a04fadcfd7d173 + sha256: ab9ff38fc771e9ee1139320adbe3d18a60327370c218c60752068ebee4b49ab1 url: "https://pub.dev" source: hosted - version: "1.1.12" + version: "1.1.15" vector_math: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 0c1e2f9b..39aa82e1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -49,7 +49,7 @@ dependencies: stock: ^1.1.0 syncfusion_flutter_charts: ^27.1.48 image_picker: ^1.0.7 - timezone: ^0.9.4 + timezone: ^0.10.0 flutter_timezone: ^3.0.1 flutter_sharing_intent: ^1.1.1 http: ^1.2.1 From 7922cc0a140165662b9b1b6e3abf10cfba31da6c Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Tue, 12 Nov 2024 18:49:33 +0000 Subject: [PATCH 23/26] adapt build script to latest flutter status also fixes various build issues --- .gitignore | 1 - .idx/dev.nix | 33 ++++++++++ android/.gitignore | 2 +- android/app/build.gradle | 61 +++++++++++-------- android/app/proguard-rules.pro | 44 ++++++++++++- android/app/src/main/AndroidManifest.xml | 28 ++++----- android/build.gradle | 37 +++++------ android/gradle.properties | 5 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- android/settings.gradle | 9 ++- pubspec.yaml | 2 +- 11 files changed, 143 insertions(+), 81 deletions(-) create mode 100644 .idx/dev.nix diff --git a/.gitignore b/.gitignore index 5836224f..747690cf 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,6 @@ migrate_working_dir/ .dart_tool/ .flutter-plugins .flutter-plugins-dependencies -.packages .pub-cache/ .pub/ /build/ diff --git a/.idx/dev.nix b/.idx/dev.nix new file mode 100644 index 00000000..f4c2ca0e --- /dev/null +++ b/.idx/dev.nix @@ -0,0 +1,33 @@ +{ pkgs }: { + channel = "stable-23.11"; + packages = [ + pkgs.nodePackages.firebase-tools + pkgs.jdk17 + pkgs.unzip + ]; + idx.extensions = [ + "dart-code.dart-code" + "dart-code.flutter" + "google.arb-editor" + "github.vscode-github-actions" + "github.vscode-pull-request-github" + "eamodio.gitlens" + "jock.svg" + ]; + idx.previews = { + previews = { + android = { + command = [ + "flutter" + "run" + "--machine" + "-d" + "android" + "-d" + "emulator-5554" + ]; + manager = "flutter"; + }; + }; + }; +} diff --git a/android/.gitignore b/android/.gitignore index 6f568019..55afd919 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -7,7 +7,7 @@ gradle-wrapper.jar GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties **/*.keystore **/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle index 4c4404ec..22ccc2c6 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,9 +1,10 @@ plugins { - id "com.android.application" - id "kotlin-android" - id "dev.flutter.flutter-gradle-plugin" + id 'com.android.application' + id 'kotlin-android' + id 'dev.flutter.flutter-gradle-plugin' } +/* def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -20,7 +21,7 @@ if (flutterVersionCode == null) { def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { flutterVersionName = '1.0' -} +}*/ def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') @@ -29,33 +30,33 @@ if (keystorePropertiesFile.exists()) { } android { + namespace = 'com.dreautall.waterflyiii' compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + // Added: flutter_local_notifications coreLibraryDesugaringEnabled true } kotlinOptions { - jvmTarget = '11' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + jvmTarget = JavaVersion.VERSION_1_8 } defaultConfig { - applicationId "com.dreautall.waterflyiii" + applicationId 'com.dreautall.waterflyiii' // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion 21 - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + minSdk = 21 + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + + // Added: flutter_local_notifications + multiDexEnabled true } signingConfigs { @@ -70,7 +71,7 @@ android { debug { minifyEnabled false shrinkResources false - applicationIdSuffix ".debug" + applicationIdSuffix '.debug' } release { @@ -96,6 +97,13 @@ flutter { source '../..' } +// Added: flutter_local_notifications +dependencies { + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2' + implementation 'androidx.window:window:1.0.0' + implementation 'androidx.window:window-java:1.0.0' +} +/* dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0" implementation 'com.google.android.material:material:1.8.0' @@ -104,15 +112,16 @@ dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.2' // Added: flutter_local_notifications implementation 'androidx.window:window:1.1.0-rc01' // Added: flutter_local_notifications implementation 'androidx.window:window-java:1.1.0-rc01' // Added: flutter_local_notifications -} +}*/ -ext.abiCodes = ["x86_64": 1, "armeabi-v7a": 2, "arm64-v8a": 3] +ext.abiCodes = ['x86_64': 1, 'armeabi-v7a': 2, 'arm64-v8a': 3] import com.android.build.OutputFile + android.applicationVariants.all { variant -> - variant.outputs.each { output -> - def abiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI)) - if (abiVersionCode != null) { - output.versionCodeOverride = variant.versionCode * 10 + abiVersionCode + variant.outputs.each { output -> + def abiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI)) + if (abiVersionCode != null) { + output.versionCodeOverride = variant.versionCode * 10 + abiVersionCode + } } - } -} \ No newline at end of file +} diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro index 3323fb30..16a3531d 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -1,3 +1,41 @@ --keep class java.net.URL { *; } --keep class java.util.concurrent.Executors { *; } --keep class org.chromium.net.** { *; } \ No newline at end of file +# Added: flutter_local_notifications +##---------------Begin: proguard configuration for Gson ---------- +# Gson uses generic type information stored in a class file when working with fields. Proguard +# removes such information by default, so configure it to keep all of it. +-keepattributes Signature + +# For using GSON @Expose annotation +-keepattributes *Annotation* + +# Gson specific classes +-dontwarn sun.misc.** +#-keep class com.google.gson.stream.** { *; } + +# Application classes that will be serialized/deserialized over Gson +-keep class com.google.gson.examples.android.model.** { ; } + +# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory, +# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter) +-keep class * extends com.google.gson.TypeAdapter +-keep class * implements com.google.gson.TypeAdapterFactory +-keep class * implements com.google.gson.JsonSerializer +-keep class * implements com.google.gson.JsonDeserializer + +# Prevent R8 from leaving Data object members always null +-keepclassmembers,allowobfuscation class * { + @com.google.gson.annotations.SerializedName ; +} + +# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher. +-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken +-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken + +##---------------End: proguard configuration for Gson ---------- + +# https://github.com/mogol/flutter_secure_storage/issues/748 +-dontwarn com.google.errorprone.annotations.CanIgnoreReturnValue +-dontwarn com.google.errorprone.annotations.CheckReturnValue +-dontwarn com.google.errorprone.annotations.Immutable +-dontwarn com.google.errorprone.annotations.RestrictedApi +-dontwarn javax.annotation.Nullable +-dontwarn javax.annotation.concurrent.GuardedBy \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 0dfc0c47..e1bae4da 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,21 +1,6 @@ - - + + + + + + + diff --git a/android/build.gradle b/android/build.gradle index 402822d1..df009eb5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -3,37 +3,28 @@ allprojects { google() mavenCentral() } -} - -rootProject.buildDir = '../build' -// see https://github.com/flutter/flutter/issues/153281#issuecomment-2292201697 -subprojects { - afterEvaluate { project -> - if (project.extensions.findByName("android") != null) { - Integer pluginCompileSdk = project.android.compileSdk - if (pluginCompileSdk != null && pluginCompileSdk < 31) { - project.logger.error( - "Warning: Overriding compileSdk version in Flutter plugin: " - + project.name - + " from " - + pluginCompileSdk - + " to 31 (to work around https://issuetracker.google.com/issues/199180389)." - + "\nIf there is not a new version of " + project.name + ", consider filing an issue against " - + project.name - + " to increase their compileSdk to the latest (otherwise try updating to the latest version)." - ) + subprojects { + afterEvaluate { project -> + if (project.hasProperty('android')) { project.android { - compileSdk 31 + if (namespace == null) { + namespace project.group + } } } } } - +} + +rootProject.buildDir = '../build' +subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" - project.evaluationDependsOn(":app") +} +subprojects { + project.evaluationDependsOn(':app') } -tasks.register("clean", Delete) { +tasks.register('clean', Delete) { delete rootProject.buildDir } diff --git a/android/gradle.properties b/android/gradle.properties index 631f68cc..25971708 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,4 +1,3 @@ -org.gradle.jvmargs=-Xmx1024M -org.gradle.caching=true +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true -android.enableJetifier=true \ No newline at end of file +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index b9fa41cb..7bb2df6b 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip diff --git a/android/settings.gradle b/android/settings.gradle index b3bf9755..b9e43bd3 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -5,10 +5,9 @@ pluginManagement { def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath - } - settings.ext.flutterSdkPath = flutterSdkPath() + }() - includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") repositories { google() @@ -19,8 +18,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "7.4.2" apply false - id "org.jetbrains.kotlin.android" version "1.8.0" apply false + id "com.android.application" version "8.1.0" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false } include ":app" diff --git a/pubspec.yaml b/pubspec.yaml index 39aa82e1..b2039158 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: waterflyiii -description: WaterFly III, a mobile client for Firefly III +description: Waterfly III, a mobile client for Firefly III publish_to: 'none' version: 1.0.9 From 877461623d6b423ab14685735d50836f547464ff Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Tue, 12 Nov 2024 19:21:44 +0000 Subject: [PATCH 24/26] fix for demo page with develop version --- lib/auth.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/auth.dart b/lib/auth.dart index f24a5aff..3c36d195 100644 --- a/lib/auth.dart +++ b/lib/auth.dart @@ -299,7 +299,11 @@ class FireflyService with ChangeNotifier { Response about = await api.v1AboutGet(); try { - _apiVersion = Version.parse(about.body?.data?.apiVersion ?? ""); + String apiVersionStr = about.body?.data?.apiVersion ?? ""; + if (apiVersionStr.startsWith("develop/")) { + apiVersionStr = "9.9.9"; + } + _apiVersion = Version.parse(apiVersionStr); } on FormatException { throw const AuthErrorVersionInvalid(); } From 6ee55c6e391826840503e5e633b9872cdf551488 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Tue, 12 Nov 2024 19:28:04 +0000 Subject: [PATCH 25/26] bump version --- fastlane/metadata/android/en-US/changelogs/380.txt | 3 +++ fastlane/metadata/android/version.txt | 4 ++-- pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/380.txt diff --git a/fastlane/metadata/android/en-US/changelogs/380.txt b/fastlane/metadata/android/en-US/changelogs/380.txt new file mode 100644 index 00000000..48645714 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/380.txt @@ -0,0 +1,3 @@ +- New Feature: Edit Expense/Revenue Account Name +- New Feature: Update Dashboard after creating / updating a transaction +- Bugfixes, Dependency Updates etc \ No newline at end of file diff --git a/fastlane/metadata/android/version.txt b/fastlane/metadata/android/version.txt index 468f7004..6d115429 100644 --- a/fastlane/metadata/android/version.txt +++ b/fastlane/metadata/android/version.txt @@ -1,2 +1,2 @@ -versionName=1.0.9 -versionCode=368 \ No newline at end of file +versionName=1.0.10 +versionCode=380 \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index b2039158..de9ec29b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: waterflyiii description: Waterfly III, a mobile client for Firefly III publish_to: 'none' -version: 1.0.9 +version: 1.0.10 environment: sdk: '>=3.0.0 <4.0.0' From ae4af26553609787b530a590af04a600fccf0ad6 Mon Sep 17 00:00:00 2001 From: dreautall <109872040+dreautall@users.noreply.github.com> Date: Tue, 12 Nov 2024 19:30:00 +0000 Subject: [PATCH 26/26] fix version code --- fastlane/metadata/android/en-US/changelogs/{380.txt => 382.txt} | 0 fastlane/metadata/android/version.txt | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename fastlane/metadata/android/en-US/changelogs/{380.txt => 382.txt} (100%) diff --git a/fastlane/metadata/android/en-US/changelogs/380.txt b/fastlane/metadata/android/en-US/changelogs/382.txt similarity index 100% rename from fastlane/metadata/android/en-US/changelogs/380.txt rename to fastlane/metadata/android/en-US/changelogs/382.txt diff --git a/fastlane/metadata/android/version.txt b/fastlane/metadata/android/version.txt index 6d115429..ea920069 100644 --- a/fastlane/metadata/android/version.txt +++ b/fastlane/metadata/android/version.txt @@ -1,2 +1,2 @@ versionName=1.0.10 -versionCode=380 \ No newline at end of file +versionCode=382 \ No newline at end of file