Commit Graph

2473 Commits

Author SHA1 Message Date
Ricki Hirner
76a47fd017 Update theme and style again to make it look like it used to look 2024-05-17 18:04:56 +02:00
Ricki Hirner
621a8c419b Fetch translations from Transifex (again) 2024-05-17 15:19:18 +02:00
Ricki Hirner
c4cf0dc07b Fix English string (remove duplicate end tag) 2024-05-17 14:59:55 +02:00
Ricki Hirner
9216605106 Version bump to 4.4-beta.1 2024-05-17 14:18:48 +02:00
Ricki Hirner
d802d67e22 Fetch translations from Transifex 2024-05-17 14:18:28 +02:00
Sunik Kupfer
f95b853248
Fix setup through nextcloud app (intent) not working (#782)
* Select nextcloud login type on nextcloud setup intent

* Fix linting error

* Add documentation

* Move model creation to compose LoginScreen

* Minor changes
- Use boolean to decide on skipping startPage
- Move login type selection logic to login types provider

* Minor changes

---------

Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-05-17 14:10:28 +02:00
Ricki Hirner
3bcecd4fd6 Try different M3 theme 2024-05-17 13:10:39 +02:00
Ricki Hirner
b93b63024c
Fix widget colors (#799) 2024-05-17 10:51:09 +02:00
Ricki Hirner
d9610b26bb Repair drawable/ic_storage_notify 2024-05-16 18:33:51 +02:00
Ricki Hirner
7c43bcc558 Version bump to 4.4-alpha.1 2024-05-16 18:22:17 +02:00
Ricki Hirner
30f9b117cc Remove unnecessary resources 2024-05-16 18:19:46 +02:00
Ricki Hirner
f2255e1d53
Drop M2 (everything is M3 now) (#797)
Drop M2
2024-05-16 17:56:18 +02:00
Sunik Kupfer
e2bfa8c56b
Rewrite AccountSettingsActivity to M3 (#795)
* Extract composables

* Drop sub component previews and minor adjustment

* Fix preview

* Extract view model

* Switch to M3

* Extract URI to Constant

* Minor changes

* We alway have AccountSettings

* Replace LiveData by State

* Use Snapshot.withMutableSnapshot in reload

* Don't show empty OAuth setting

---------

Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-05-16 17:34:11 +02:00
Ricki Hirner
5cc29fc58a
M3 tweaks (#796)
* Refine chips in collection list

* Refine PermissionSwitchRow

* Collections list

* Fix WelcomePage and IntroActivity background color in dark mode

* Fix RadioWithSwitch in dark mode

* Drawer handler: branding in dark mode
2024-05-16 16:45:40 +02:00
Sunik Kupfer
6f02669832
Rewrite AppSettingsActivity to M3 (#792)
* Extract composables

* Extract model and companion object

* Switch to M3

* Linting

* Drop previews for sub composables

* Minor adjustments for readability

* Minor changes

- use manual URL from Constants
- use M3 in some Composables

* Create PreferenceRepository (for now only for verbose logging)

* Move actual settings to model; M3 Composables

---------

Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-05-16 13:00:20 +02:00
Ricki Hirner
e11d511971 Update dependencies 2024-05-16 11:46:26 +02:00
Ricki Hirner
00eeb0e6d5
More DI using Hilt (#789)
* [WIP] More hilt

* Use assisted inject for AccountSettingsMigrations

* DavDocumentsProvider: inject CredentialsStore

* Create a new WebdavScope and scope caches and credentials store to it

* Fix CredentialsStoreTest
2024-05-15 17:57:41 +02:00
Sunik Kupfer
814d19e698
Rewrite WifiPermissionsActivity to M3 (#791)
* Extract composables

* Extract view model and create preview

* Switch to M3 and linting

* Optimize imports

* Minor changes

---------

Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-05-15 16:57:48 +02:00
Sunik Kupfer
86252f9117
Rewrite DebugInfoActivity to M3 (#744)
* Convert M2 calls to M3

* Extract composable to screen

* Extract viewmodel

* Make screen model independent

* Use only primitive types in screen

* Introduce uiState class and switch to compose state where easy

* Switch remaining live data to compose state

* Add kdoc

* Add scrolling, adapt buttons to M3

* Move Intent logic to Activity

- create/handle Intent in Activity (may be replaced by NavGraph in future)
- Activity: pass unpacked initial data to Screen
- Screen: use hiltViewModel (adds hilt-navigation-compose dependency) to
  create model with initial data
- Screen: use Column instead of LazyColumn

* Fix test

* Optimize imports

* Minor changes

* Move AppTheme, fix showDebugInfo

* View instead of share logs; make local/remote resource smaller; make remote resource selectable

* Leave space for scrolling down past the FAB; don't show "Local resource: null"

* Re-order composables

---------

Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-05-15 16:43:23 +02:00
Arnau Mora
b5334887e8
Added M3 theme to intro pages (#756)
* Added M3 theme

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Don't use M2 colors anymore

---------

Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Sunik Kupfer <kupfer@bitfire.at>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-05-15 15:59:53 +02:00
Arnau Mora
6b863164a4
Rewrite BatteryOptimizationsPage to M3 (#747)
* Migrated to M3

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Arch update for best practises

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Moved composable to individual file

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Renamed function

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Moved ViewModel

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Moved ViewModel

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Moved ViewModel-based Composable

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Created `UiState`

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Fixed model name

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Typo

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Fixed checkboxes

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Make checkboxes clickable too

* Optimized imports

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Optimize imports

---------

Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Co-authored-by: Sunik Kupfer <kupfer@bitfire.at>
2024-05-15 14:11:22 +02:00
Sunik Kupfer
b4e58eeb44
Log last sync time per collection service and URL (#702)
* Log last sync time per collection service and URL

* Remove unused deprecated method

* Include tasks and other services as caldav type
2024-05-14 21:28:18 +02:00
Arnau Mora
a246046f41
AccountSettingsActivity: make canAccessWifiSsid live-capable (#732)
* Added `canAccessWifiSsidLive`

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Fixed initial state

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Cleaned up code

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* More cleanup

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Removed inspection check

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Renamed function

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Using `broadcastReceiverFlow`

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Simplified check

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Using `MODE_CHANGED_ACTION`

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Updated comment

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Set default value for immediate

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Use derivedStateOf instead of produceState; correctly collect broadcastReceiverFlow

* Always show WifiSSID Card in Preview (otherwise Preview won't render)

* Don't call flow.map in Composable

---------

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-05-11 14:49:56 +02:00
Ricki Hirner
0552bcab4a Version bump to 4.3.17-alpha.4 2024-05-09 21:28:38 +02:00
Ricki Hirner
3681507582
Inject SyncDispatcher over Hilt (#784)
* Inject SyncDispatcher over Hilt

* Use setWorkerFactory for TestListenableWorkerBuilder

* Correctly inject SyncDispatcher over an AssistedFactory
2024-05-09 21:20:38 +02:00
Arnau Mora
364f372a8b
Rewrite TasksIntroPage to M3 (#760)
* Migrated to M3

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Fixed theme

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Moved Composables and Model to individual files

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Move AppTheme to screen composable

* Fixed model name

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Minor re-ordering

---------

Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Co-authored-by: Sunik Kupfer <kupfer@bitfire.at>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-05-09 18:51:38 +02:00
Ricki Hirner
857309c451 Correctly handle DeadObjectException (bitfireAT/davx5#578, #591)
* Soft fail sync on DeadObjectException so that it is retried without immediate error message

* Handle DeadObjectException (→ retries sync); Syncer: generalize all-catch
2024-05-09 13:52:50 +02:00
Sunik Kupfer
ad24dd54c7
Fix login detail pages loosing user changes on rotation / re-creation (closes #775) (#778)
Inject view models in composables using hilt
2024-05-07 10:17:25 +02:00
Ricki Hirner
952cb52b95
Don't listen for account changes all the time (#780)
* Delete account: don't rely on cleanup worker

* Don't list for account changes all the time
2024-05-04 20:52:50 +02:00
Ricki Hirner
1ad8e892b6
Intro pages: use Hilt for dependency injection (#779)
* Accounts: move syncAll to model; better Hilt usage

* Move calculation of whether IntroActivity is shown into AccountsModel

* Intro pages: inject dependencies with Hilt

* Fix preview
2024-05-04 20:10:36 +02:00
Arnau Mora
4cffbe7b40
Rewrite PermissionsIntroPage to M3 (#758)
* Migrated to M3

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Replaced preview theme

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Fixed theme

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Forced all sets to be private

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Moved Composables and Model to individual files

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Fixed naming

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Theme / M3 changes

* Observe lifecycle from within Screen

* Minor changes

---------

Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-05-04 13:46:32 +02:00
Ricki Hirner
e6eb90861e
Use hiltViewModel for creating ViewModels with parameters in new Screen architecture (#776)
* Add hilt-navigation-compose dependency

* AccountScreen: use hiltViewModel

* Use hiltViewModel for CollectionScreen and CreateCollectionScreens
2024-05-03 14:46:46 +02:00
Ricki Hirner
9005121b52 Update dependencies (including AGP) 2024-05-03 12:23:58 +02:00
Arnau Mora
a7c04c2bf7
Replace DavUtils.lastSegmentOfUrl by UrlUtils.lastSegment (#767)
* Added `ReplaceWith` to `lastSegmentOfUrl`

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Replaced all usages

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Rollback replacement

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Added tests for UrlUtils

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Got rid of `DavUtils.lastSegmentOfUrl`

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Turned into variable

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

* Fixed method call

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

* Fixed method call

Signed-off-by: Arnau Mora <arnyminerz@proton.me>

---------

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-05-03 11:29:05 +02:00
Ricki Hirner
39f8f2e475 Add issue templates 2024-05-02 14:03:01 +02:00
Sunik Kupfer
9c6c95a249
Start at LoginDetails page if logging in via intent (#772)
* Start at LoginDetails page if login via intent has data

* Ignore intent on re-creation
2024-05-02 12:43:08 +02:00
Sunik Kupfer
aafcb2e94a
Pre-select per-contact categories for login type NextcloudLogin (#774)
* Pre-select per-contact categories for login type NextcloudLogin

* Update the group method unconditionally to suggested group method
2024-05-02 12:32:23 +02:00
Arnau Mora
e40fa6e0fb
Switched CalDAV and CardDAV tab positions (#769)
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
2024-05-02 11:18:30 +02:00
Arnau Mora
c9fd66bd63
Rewrite OpenSourcePage to M3 (#755)
Migrated to M3

Signed-off-by: Arnau Mora <arnyminerz@proton.me>
2024-05-02 11:11:51 +02:00
Arnau Mora
99cf0eca7a
Migrated to M3 (#754)
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
2024-05-02 11:08:37 +02:00
Ricki Hirner
2b2476b4bc
Rewrite RenameAccountDialog to M3 (#768) 2024-04-30 14:37:12 +02:00
Arnau Mora
81834ca0db
AccountsScreen: move navigation drawer to foreground so that it overlays FABs when open (#765)
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
2024-04-30 14:20:52 +02:00
Ricki Hirner
0a4a06a50a Minor lint 2024-04-30 11:49:01 +02:00
Ricki Hirner
40795bf5c0 Version bump to 4.3.17-alpha.3 2024-04-30 11:40:40 +02:00
Ricki Hirner
40034fe400 Update dependencies 2024-04-30 11:27:26 +02:00
Ricki Hirner
b13c6b0e6f
Rewrite AccountActivity to M3 (#752)
* [WIP] Separate AccountScreen, use M3 elements

* [WIP] Use UseCases for complex flow calculations

* [WIP] Move account deletion logic into AccountRepository

* Move rename operation to repository

* Adapt FABs

* Don't use snackbars to show when the collection list is refreshed

* New collection list layout (bitfireAT/davx5#159)

* [WIP] Create AccountModel from within screen

* [WIP] Clean up AccountScreen

* [WIP] CreateAddressBook

* [WIP] Create address book / calendar screen

* [WIP] Begin CollectionScreen

* [WIP] CollectionScreen

* Error handling

* String resources

* Optimizations, remove unnecessary things
2024-04-30 11:25:29 +02:00
Ricki Hirner
c33ea84c77
Rewrite AccountsActivity to M3 (#749)
* [WIP] Rewrite AccountsActivity to M3

* [WIP] AccountsScreen: FAB, previews

* [WIP] Warning cards

* Adapt FABs
2024-04-26 11:20:55 +02:00
Ricki Hirner
0c748ebe73 Provide snackbar to LoginTypesProvider (backport of bitfireAT/davx5#576) 2024-04-24 10:31:46 +02:00
Ricki Hirner
fda96ac653 Version bump to 4.3.17-alpha.2 2024-04-23 17:42:07 +02:00
Ricki Hirner
597c572f24 Login: allow changing account name when suggestions are expanded (bitfireAT/davx5#573) 2024-04-23 17:42:03 +02:00