From e731f44ab840a016e131336c684b14ee03810d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C9=91rry=20Shiv=C9=91m?= Date: Wed, 8 May 2024 13:49:36 +0530 Subject: [PATCH] feat: Add ability to archive completed goals and other improvements (#119) Commits: * Update database schema and and add initial layout * Add archived goal item card * Replace deposit button with archive is goal is completed * Implement goal archive screen and functionality * Add missing translations and some cleanup --------- Signed-off-by: starry-shivam --- .idea/deploymentTargetSelector.xml | 4 +- .../6.json | 190 +++++++ .../7.json | 190 +++++++ .../greenstash/database/core/AppDatabase.kt | 6 +- .../starry/greenstash/database/goal/Goal.kt | 7 +- .../greenstash/database/goal/GoalDao.kt | 82 ++- .../database/transaction/TransactionDao.kt | 12 + .../greenstash/database/widget/WidgetDao.kt | 17 + .../greenstash/ui/common/ExpandableCard.kt | 2 - .../greenstash/ui/navigation/DrawerScreens.kt | 11 +- .../greenstash/ui/navigation/NavGraph.kt | 14 + .../ui/screens/archive/ArchiveViewModel.kt | 69 +++ .../archive/composables/ArchiveScreen.kt | 521 ++++++++++++++++++ .../backups/composables/BackupScreen.kt | 5 +- .../ui/screens/home/HomeViewModel.kt | 13 + .../ui/screens/home/composables/GoalItems.kt | 98 +++- .../screens/home/composables/GoalLazyItem.kt | 40 +- .../screens/home/composables/HomeDialogs.kt | 53 +- .../ui/screens/home/composables/HomeDrawer.kt | 311 ++++++----- .../ui/screens/home/composables/HomeScreen.kt | 43 +- .../info/composables/GoalInfoScreen.kt | 75 +-- .../screens/input/composables/InputScreen.kt | 33 +- .../ui/screens/other/CongratsScreen.kt | 5 +- .../settings/composables/AboutScreen.kt | 13 +- .../settings/composables/GoalCardStyle.kt | 11 +- .../screens/settings/composables/OSLScreen.kt | 58 +- .../settings/composables/SettingsScreen.kt | 5 +- .../configuration/WidgetConfigActivity.kt | 192 +++---- .../res/drawable/ic_compact_goal_archve.xml | 16 + ...t_plus.xml => ic_compact_goal_deposit.xml} | 0 ...minus.xml => ic_compact_goal_withdraw.xml} | 0 app/src/main/res/drawable/ic_nav_archive.xml | 15 + app/src/main/res/drawable/ic_nav_backups.xml | 7 +- app/src/main/res/drawable/ic_nav_privacy.xml | 15 +- .../res/drawable/ic_transaction_deposit.xml | 20 - .../res/drawable/ic_transaction_withdraw.xml | 20 - app/src/main/res/values-es/strings.xml | 13 +- app/src/main/res/values-ru/strings.xml | 12 +- app/src/main/res/values-tr/strings.xml | 12 +- app/src/main/res/values-zh-rCN/strings.xml | 12 +- app/src/main/res/values-zh-rTW/strings.xml | 12 +- app/src/main/res/values/strings.xml | 12 +- 42 files changed, 1824 insertions(+), 422 deletions(-) create mode 100644 app/schemas/com.starry.greenstash.database.core.AppDatabase/6.json create mode 100644 app/schemas/com.starry.greenstash.database.core.AppDatabase/7.json create mode 100644 app/src/main/java/com/starry/greenstash/ui/screens/archive/ArchiveViewModel.kt create mode 100644 app/src/main/java/com/starry/greenstash/ui/screens/archive/composables/ArchiveScreen.kt create mode 100644 app/src/main/res/drawable/ic_compact_goal_archve.xml rename app/src/main/res/drawable/{ic_deposit_plus.xml => ic_compact_goal_deposit.xml} (100%) rename app/src/main/res/drawable/{ic_withdraw_minus.xml => ic_compact_goal_withdraw.xml} (100%) create mode 100644 app/src/main/res/drawable/ic_nav_archive.xml delete mode 100644 app/src/main/res/drawable/ic_transaction_deposit.xml delete mode 100644 app/src/main/res/drawable/ic_transaction_withdraw.xml diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml index 495ef5f9..c7d93f7d 100644 --- a/.idea/deploymentTargetSelector.xml +++ b/.idea/deploymentTargetSelector.xml @@ -4,10 +4,10 @@