Commit Graph

140 Commits

Author SHA1 Message Date
arkon
3cca460282 Misc cleanup 2023-03-19 22:38:14 -04:00
arkon
7d8a865cac Simplify some of the notification builders 2023-03-19 16:24:37 -04:00
arkon
93523ef50b Remove dependency injection from core module and data module from presentation-widget module
Includes side effects:
- No longer need to restart app for user agent string change to take effect
- parseAs extension function requires a Json instance in the calling context, which doesn't necessarily need to be the default one provided by Injekt
2023-02-20 19:02:38 -05:00
arkon
3d7c136320 Avoid crash when loading invalid extension package 2023-02-19 16:44:58 -05:00
arkon
d400ac2a49 Remove unnecessary usages of NotificationManagerCompat to actually create notifications 2023-02-18 17:10:45 -05:00
arkon
2970eca9e4 Remove background extensions updates check
Same reasoning as removing app update check. It gets kicked off in the foreground now too.
2023-02-12 23:07:11 -05:00
arkon
ab6dfe9e25 Bump dependencies
Fixes #8168, I think.
2023-02-08 22:53:42 -05:00
Two-Ai
aca65f13bb Misc Service cleanup (#9005)
* Simplify DownloadService wake lock handling

_isRunning is only modified in onCreate/onDestroy, so the listener
job is redundant.

* Drop superclass calls to Service.onCreate/onDestroy

From https://developer.android.com/guide/components/services
> Note: Unlike the activity lifecycle callback methods, you are not
> required to call the superclass implementation of these callback
> methods.
2023-01-30 17:25:54 -05:00
arkon
1730dd6af1 Move more things around 2023-01-27 22:31:12 -05:00
stevenyomi
448702e5be OkHttp Call: split await() and awaitSuccess() (#8980) 2023-01-24 22:34:31 -05:00
arkon
b53e24e0db Move more models to domain module 2023-01-22 10:37:13 -05:00
stevenyomi
293b967858 Fix installing extensions on MIUI (#8916)
* Fix installing extensions on MIUI

* isShizukuReady -> isShizukuInstalled
2023-01-15 10:32:27 -05:00
arkon
a2ee4e63ae Minor cleanup 2023-01-12 22:53:28 -05:00
arkon
5d9753d6a7 Bump minimum ext-lib to 1.3 2023-01-08 10:32:35 -05:00
Ivan Iskandar
8552838bda Update WorkManager (#8772) 2022-12-18 12:14:06 -05:00
Jays2Kings
7608cb0da3 Check ext lib version when checking for updates (#8740) 2022-12-14 13:49:10 -05:00
arkon
3480b45098 Minor cleanup 2022-11-27 17:12:45 -05:00
arkon
811931ccc0 Minor cleanup 2022-11-10 22:23:34 -05:00
AntsyLich
e1ab1fdb65 Prompt Extension update if ext-lib is updated
Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-10-29 10:05:30 -04:00
arkon
7e40680af0 Perform download cache renewal async
Don't block on cache renewals, but notify library on updates so that the badges show up when ready.

We skip the cache when checking if a chapter is downloaded for the reader assuming that it's a
relatively low cost to check for a single chapter.

(Probably) fixes #8254 / fixes #7847
2022-10-21 15:00:41 -04:00
arkon
93925a7286 Remove redundancy in ExtensionManager 2022-10-21 14:42:21 -04:00
arkon
6be9cccc7a Revert min extension-lib change
Some extensions haven't been bumped yet. We should probably try to bump everything at some point.
Also includes some minor cleanup.
2022-10-01 13:24:38 -04:00
arkon
db3cbac310 Stop loading extension-lib <= 1.2 2022-10-01 11:34:46 -04:00
Alessandro Jean
ba533f30ce Add support to update strategy on global update (#7902)
* Add support to update strategy.

* Add JavaDoc and bump the LIB_VERSION_MAX constant.

* Fix a word typo.

* Store update strategy enum as integer in the DB.
2022-09-25 10:12:36 -04:00
Andreas
29fa93e829 Split the rest of the preferences in PreferencesHelper (#8074)
* Split the reset of the preferences in PreferencesHelper

* Capitalize ThemeMode
2022-09-25 10:07:06 -04:00
arkon
b37b3767f3 Minor cleanup
Also add POST_NOTIFICATIONS permissions to make Android Studio stop complaining about it.
2022-09-21 22:39:32 -04:00
Andreas
30b3b2d3ff Split source preferences from PreferencesHelper (#8029) 2022-09-18 10:36:41 -04:00
Andreas
0086743a53 Use 1.x preference abstraction (#8020)
* Use 1.x preference abstraction

- Uses SharedPreferences compared to 1.x impl which uses DataStore but it breaks all settings screens currently
- Move PreferencesHelper to new PreferenceStore
  - PreferencesHelper should be split into smaller preference stores and be in core or domain
- Remove flow preferences as new PreferenceStore handles changes for us

Co-authored-by: inorichi <3521738+inorichi@users.noreply.github.com>

* Fix PreferenceMutableState not updating

* Fix changes not emitting on first subscription

Co-authored-by: inorichi <3521738+inorichi@users.noreply.github.com>
2022-09-17 11:48:24 -04:00
arkon
cd3cb72b65 Bump dependencies + linting 2022-09-10 23:57:03 -04:00
Alessandro Jean
084e6a964e Enable sub-languages on app first run (#7127)
* Enable sub-languages on app first run.

* Fix wrong language code string parsing.

* Fix some build issues due to rebase.

* Use PreferenceHelper and remove an extra preference.

* Remove a constant.
2022-08-30 15:37:15 -04:00
AntsyLich
8d40e20b7d Prevent unofficial exts from getting marked as obsolete or updateable (#7871)
* Prevent unofficial exts from getting marked as obsolete

* Prevent unofficial ext `hasUpdate` getting marked as true
2022-08-27 12:12:59 -04:00
arkon
d6f1534ee8 Address misc. build warnings 2022-08-10 23:26:34 -04:00
Andreas
7892cc1519 Log extension loading errors directly (#7716) 2022-08-10 15:53:47 -04:00
Ivan Iskandar
b3426f37e7 ExtensionPresenter: Fix crash on first launch (#7685)
* Revert "Use SharedFlow for available extensions to always emit the value (#7609)"

This reverts commit 73901f50c0.

* ExtensionPresenter: Explicitly set refreshing status

* Scope coroutines job to presenter

* cleanup

* fix toast
2022-08-04 15:44:37 -04:00
Andreas
73901f50c0 Use SharedFlow for available extensions to always emit the value (#7609)
- Fixes Extension screen being stuck refreshing due to StateFlow not emitting due to the value being the same
2022-07-25 08:31:41 -04:00
Andreas
35ec593658 Use Flow in ExtensionManager and SourceManager (#7547)
- Replace ExtensionManager relay and observable with Flow
- Inverse SourceManager dependency
    - SourceManager observers ExtensionManager flow
- Separate SourceData from SourceRepository as it created a circular dependency
2022-07-16 15:08:15 -04:00
Andreas
018ca71336 Use Stable interface for Browse screens (#7544) 2022-07-16 14:44:37 -04:00
AntsyLich
64f60c36e6 ExtensionManger: Fix unofficial extension has update (#7503) 2022-07-10 10:00:48 -04:00
stevenyomi
284445c364 Extension API: change fallback source and logic (#7400)
* Extension API: change fallback source and logic

* remove ghproxy
2022-06-29 18:34:25 -04:00
AntsyLich
9d5b7de1d8 Maintain source info in the database. (#6389)
* Maintain Source Info in database

* Review changes and cleanups

* Review changes 2

* Review Changes 3
2022-06-14 09:10:40 -04:00
kasperskier
7b242bf118 Change jsDelivr CDN URL to Fastly (#7156) 2022-05-17 17:19:17 -04:00
arkon
d61bfd7caf Use jsDelivr as fallback when GitHub can't be reached for extensions (closes #5517)
Re-implementation of 24bb2f02dc
2022-05-15 16:51:52 -04:00
arkon
b950370f12 Address some build warnings 2022-05-11 18:08:49 -04:00
FourTOne5
49d3ddb830 Add -r flag to ShizukuInstaller createCommand (#7080) 2022-05-06 22:00:24 -04:00
Andreas
29a0989f28 Convert Source tab to use Compose (#6987)
* Use Compose in Source tab

* Replace hashCode with key function

* Add ability to turn off pins moving on top of source list

* Changes from review comments
2022-04-24 14:35:59 -04:00
arkon
f16fb4e1e4 Minor cleanup 2022-04-14 18:15:47 -04:00
arkon
4ecde9fc39 Gate update/download warnings to non-stable flavors 2022-04-10 12:17:45 -04:00
arkon
5afff31f72 Formatting 2022-04-08 16:44:23 -04:00
arkon
f0eb42e72d Update linter 2022-04-08 15:30:39 -04:00
Ivan Iskandar
ef600c0956 Fix extension update badge reset when app resumed (#6822) 2022-03-25 11:11:16 -04:00