Commit Graph

2024 Commits

Author SHA1 Message Date
Ricki Hirner
ea035fa931 Version bump to 4.4.1-alpha.2 2024-06-25 14:52:51 +02:00
Ricki Hirner
bcc16e1ab6
Implement basic Push functionality (#856)
* Move PushRegistrationWorker to push package

* Add UP dependency

* [WIP] UnifiedPush basic implementation

* Handle endpoint unregistration

* [WIP] Parse push notification message

* Parse push message in PushMessageParser

* Sync only affected account on push message

* Only initiate sync when push message is about a syncable collection

* Push registration worker: log when there's no configured endpoint

* Handle invalid/non-XML push messages

* app settings: show UP endpoint
2024-06-25 14:07:29 +02:00
Ricki Hirner
0985a99ed3 Update dependencies, remove unnecessary dependencies 2024-06-13 22:27:14 +02:00
Arnau Mora
1d7084b555
Add Push Subscription Management (#800)
* [wip] Create worker for push registration and call it from someplace in UI

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

* [wip] Subscription registration request

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

* Don't enqueue push registration worker from UI

* Enqueue PushRegistrationWorker on collection changes

* Fix tests

* Update dav4jvm; Use new post method

* Remove obsolete context

* Add get and deleteAll methods to serviceRepository and update usages

* requestPushRegistration: make endpoint an argument

* Update push subscription fields in DB on successful registration

* Don't create notification channels in test class

* Remove workmanager init and provide empty set of listeners in tests

* Require network connection to run PushRegistrationWorker

* Move module declaration to a separate TestModules interface

---------

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-06-13 13:12:59 +02:00
Sunik Kupfer
64563bbd3a
Observable collections repository (#829)
* Call collection updates and setters only from repository

* Make collection repository changes observable

* Add kdoc

* Add basic test

* Extract RefreshCollectionsWorker; move some HomeSetDao calls to DavHomeSetRepository

* Replace more HomeSetDao calls

* Remove duplicate copyright notice

* Drop weak reference for observers

* Rename method

* Remove test service after run

* Verify notifying works with mockk

* Rename test

* Use construction injection

* Remove unused SettingsManager

* Remove obsolete mockk rule

* Use runBlocking instead of runTest

* Change to observer linkedList to mutableSetOf, remove synchronized calls

* Change to hilt multibinding

* Remove some unnecessary lines; allow empty set by Hilt

* CollectionListRefresher: delete collections using repository

* deleteRemote: call callback too; adapt KDoc

---------

Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-06-12 12:43:56 +02:00
Ricki Hirner
70e56df80c Move repository test package 2024-06-10 13:40:33 +02:00
Ricki Hirner
b4756666b6
Extract RefreshCollectionsWorker; move some (HomeSet)Dao calls to repository (#845)
* Extract RefreshCollectionsWorker; move some HomeSetDao calls to DavHomeSetRepository

* Replace more HomeSetDao calls

* Remove unused SettingsManager
2024-06-10 12:16:33 +02:00
Ricki Hirner
74304bfe17 Version bump to 4.4.1-alpha.1 2024-06-09 23:02:23 +02:00
Ricki Hirner
25daa57a6f
Show CalDAV/CardDAV/Webcal tab when there's at least one item (#839)
Show CalDAV/CardDAV/Webcal tab when there's at least one time
2024-06-08 18:44:35 +02:00
Ricki Hirner
a3ccdc2a46
Define toolchain version; update dependencies (#834) 2024-06-08 18:09:45 +02:00
Arnau Mora
ffefd519b6
[Google] Allow login with custom domains again (#833)
Modified emailWithDomain in UiState

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
2024-06-07 10:11:00 +02:00
Ricki Hirner
9b5d5c982b Version bump to 4.4.0.1 2024-05-31 08:49:25 +02:00
Ricki Hirner
a03c83450d
App settings: mention that verbose logs can be viewed in debug info (#824) 2024-05-31 08:47:52 +02:00
Ricki Hirner
671c17376a
PreferenceRepository.observeAsFlow: emit initial value (#822) 2024-05-30 10:09:34 +02:00
Ricki Hirner
1856a5d7ce Fix R8 rules 2024-05-29 17:25:05 +02:00
Ricki Hirner
9cb78429e3 Fetch translations from Transifex 2024-05-29 17:10:32 +02:00
Ricki Hirner
2b17692fd6 Version bump to 4.4 2024-05-29 17:07:10 +02:00
Ricki Hirner
19e69f2079 Version bump to 4.4-rc.1 2024-05-28 23:39:38 +02:00
Ricki Hirner
72b90655e6 Update dark theme 2024-05-28 23:38:18 +02:00
Ricki Hirner
cdf83dad37
MKCALENDAR: wrap supported components in <CALDAV:supported-calendar-co… (#816)
* MKCALENDAR: wrap supported compoents in <CALDAV:supported-calendar-component-set>

* MKCALENDAR/MKCOL body generation: use Property.Name from dav4jvm instead of own strings
2024-05-28 21:05:09 +02:00
Ricki Hirner
e6be7a659f
Last M3 Tweaks (#817)
* [WIP] Colors

* Update navigation drawer

* Update colors

* [WIP] PermissionSwitchRow night mode

* Fix PermissionSwitchRow icon in night mode

* Use more intense colors for FABs
2024-05-28 20:58:51 +02:00
Sunik Kupfer
08c695bf05
Fix last sync time not being set for address books (closes #810) (#812)
* Use correct account name when retrieving service

* Rename method, add kdoc

* Address books: require main account and use as Account

---------

Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-05-27 17:00:32 +02:00
Arnau Mora
d7221974ed
Increased icon size and text size for accounts list (#813)
* Increased icon size and text size

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

* Adapt

---------

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-05-27 16:28:34 +02:00
Arnau Mora
9a31835b1c
Fix color picker size (#808)
* Fix color picker size

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

* Removed missing comment & import optimization

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

* Added border

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

* Color picker: use OutlinedButton

---------

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-05-27 14:53:39 +02:00
Ricki Hirner
4a49c8d6c2 Update dependencies 2024-05-25 21:26:09 +02:00
Sunik Kupfer
c493fbd349
Orange progress indicator bar (#803)
* Create ProgressBar composable with secondary default color

* Minor change

* Add import

---------

Co-authored-by: Ricki Hirner <hirner@bitfire.at>
2024-05-25 20:21:33 +02:00
Arnau Mora
71c57fc00d
Fix padding for show only personal (#807)
* Fixed padding for "Show only personal checkbox"

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

* Aligned text correctly

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

---------

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
2024-05-25 20:15:58 +02:00
Ricki Hirner
3044ff70aa Increase version code 2024-05-17 18:05:42 +02:00
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
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