Commit Graph

18 Commits

Author SHA1 Message Date
Zongle Wang 1acae50845
Convert some sealed classes to interfaces (#4347)
There is no non-abstract field in them, we can just fall back to
interfaces.
2024-03-29 20:11:53 +01:00
Konrad Pozniak b976fe5296
full sdk 34 support (#4224)
builds upon work from #4082 

Additionally fixes some deprecations and adds support for [predictive
back](https://developer.android.com/guide/navigation/custom-back/predictive-back-gesture).
I also refactored how the activity transitions work because they are
closely related to predictive back. The awkward
`finishWithoutSlideOutAnimation` is gone, activities that have been
started with slide in will now automatically close with slide out.

To test predictive back you need an emulator or device with Sdk 34
(Android 14) and then enable it in the developer settings.

Predictive back requires the back action to be determined before it
actually occurs so the system can play the right predictive animation,
which made a few reorganisations necessary.

closes #4082 
closes #4005 
unlocks a bunch of dependency upgrades that require sdk 34

---------

Co-authored-by: Goooler <wangzongler@gmail.com>
2024-02-23 10:27:19 +01:00
Konrad Pozniak 5192fb08a5
upgrade ktlint plugin to 12.0.3 (#4169)
There are some new rules, I think they mostly make sense, except for the
max line length which I had to disable because we are over it in a lot
of places.

---------

Co-authored-by: Goooler <wangzongler@gmail.com>
2024-01-04 17:00:55 +01:00
Goooler 40bd95d752
Kotlin 1.9.0 (#3835)
Update to Kotlin 1.9.0 and migrate to newer language idioms.

- Remove unnecessary @OptIn for features migrated to mainstream
- Use `data object` where appropriate
- Use new enum `entries` property
2023-08-02 09:04:24 +02:00
Konrad Pozniak 85b7caa887
Replace deprecated getParcelable* methods with compat versions (#3633) 2023-06-11 12:58:55 +02:00
Konrad Pozniak d839f18267
update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
Konrad Pozniak 1fb58a9116
revert CompatExtensions (#2773) 2022-11-09 19:32:54 +01:00
Josh Soref 98092e6ff7
Spelling (#2771)
* spelling: activity

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: animation

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: detailed

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: hierarchy

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: javascript

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: memory

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: notification

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: opened

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: preferable

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: repetitive

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: spoiler

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: thumbnail

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: visibility

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: whitespace

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-11-09 19:32:39 +01:00
Konrad Pozniak 8e9b356074
show rules on the login screen (#2746)
* show rules on the login screen

* fix code formatting

* fix code formatting

* fix tests
2022-11-05 17:37:20 +01:00
Konrad Pozniak d17a0c43ab
Api 33 support (#2719)
* update to Api 33, fix some deprecations

* fix deprecated serializable/parcelable methods

* ask for notification permission

* fix code formatting

* add back comment in PreferencesActivity
2022-11-04 19:22:38 +01:00
Konrad Pozniak becb677176
make WebView debuggable in debug builds (#2548) 2022-05-27 18:44:16 +02:00
Konrad Pozniak db81ede04a
fix login webview title color with light theme (#2497) 2022-05-04 18:40:29 +02:00
Ivan Kupalov f3d7923803
Improve UX when Login WebView fails to load the page (#2492)
Previously we simply closed the screen with the login WebView which
could cause confusion. Now we specify that page could not be loaded.

As a side effect it will also show the error message which the server
returns (if any).
2022-05-03 19:14:55 +02:00
Konrad Pozniak e5b58770ce
improve LoginWebViewActivityUX (#2465) 2022-04-28 20:38:51 +02:00
Konrad Pozniak 7aa328b3dc
fix login on Android API level <24 (#2432) 2022-04-15 10:50:28 +02:00
Conny Duck 152c8b45d0 enable JavaScript in LoginWebViewActivity 2022-03-17 21:52:06 +01:00
Konrad Pozniak 0dc32774ec
handle screen rotation in LoginWebViewActivity (#2390) 2022-03-17 21:50:14 +01:00
Ivan Kupalov 4d8289b245
Implement Login via WebView (#2371)
* Improve login process with newer APIs

* Implement login with WebView instead of browser tab or external browser

Oauth process requires us to open login prompt for correct instance and
we need to receive the result back. Usually it is done with redirect
parameter.

Previously we've been using BrowserTabs API and have been falling back
to just opening browser. This mostly worked but is very clumsy:

 - It relies on few system mechanisms for opening URLs in both
directions
 - Browsers do weird things and tend to break quite a bit
 - There's a good chance that the app can die in the process and we need
to recover our state.

So instead we are now using WebView. It has disadvantages (users have
to trust us to show correct page, logins are not shared w/ browser) but
it should be more reliable.

* Changes to login after review

* Move login classes to their own package

* Fix linting issues
2022-03-08 21:22:19 +01:00