Compare commits

..
808 Commits
Author SHA1 Message Date
tom5079 5f79c11303 tag suggestion 2025-03-09 12:09:33 -07:00
tom5079 a9cd3db27e prevent adding two empty tags 2025-03-08 15:34:25 -08:00
tom5079 47d96a6ba9 dependency update 2025-03-08 15:27:57 -08:00
tom5079 3ee5e683f4 fix 2025-03-08 15:16:58 -08:00
tom5079 71e8cebff4 wip 2024-11-18 19:29:51 -08:00
tom5079 fd3f1454c5 fixed tag overflow, detail page padding 2024-07-02 11:43:24 -07:00
tom5079 4028739e70 complete migration to compose 2024-07-01 11:20:53 -07:00
tom5079 067a263336 wip 2024-04-06 18:08:22 -07:00
tom5079 62948abf75 Basic Navigation 2024-03-27 00:21:16 -07:00
tom5079 e8ba5c4881 Fix oom 2024-03-24 22:56:24 -07:00
tom5079 e648b6dfee DetailedGalleryInfo card 2024-03-24 17:50:31 -07:00
tom5079 d1381b8700 DetailedGalleryInfo card 2024-03-24 11:54:54 -07:00
tom5079 f8df28311e Fix Certificate 2024-03-24 00:21:03 -07:00
tom5079 59afa04744 Search bar offset / GalleryInfo card 2024-03-23 23:46:33 -07:00
tom5079 7a5c3ae2ed Paging 2024-03-20 19:28:27 -07:00
tom5079 9e9a5998cd Search 2024-03-17 15:02:35 -07:00
tom5079 f34876ca93 add room dependency 2024-03-04 19:45:59 -08:00
tom5079 48752a323f Dependency update, tag suggestion 2024-03-04 19:22:22 -08:00
tom5079 ab3e6466d5 Autofocus, Inset handling 2024-03-03 22:18:26 -08:00
tom5079 419c8fc644 Tag editor 2024-03-03 12:30:23 -08:00
tom5079 69078ac42e Suggestion 2024-03-02 17:51:18 -08:00
tom5079 91b6baaf1c Better icon / Black query 2024-03-02 17:11:44 -08:00
tom5079 3f3774a0cd QueryEditor 2024-03-02 15:56:27 -08:00
tom5079 efc40ce458 queryeditor wip 2024-02-25 23:27:23 -08:00
tom5079 39b8bbc725 Search bar skeleton 2024-02-24 10:24:36 -08:00
tom5079 b0fedd78fb Navigation bars 2024-02-20 11:52:52 -08:00
tom5079 72b0fa78bb Migrated networking to ktor 2024-02-19 23:19:29 -08:00
tom5079 114158cf73 fix backup file selection, support hasha link 2024-01-15 19:01:30 -08:00
tom5079 6d108dd7ff fix backup, notification for android 33+ 2024-01-14 14:30:17 -08:00
tom5079 f36b7f1dbe Update README.md 2022-07-20 09:05:47 -07:00
tom5079 0a22ebd8e9 Merge remote-tracking branch 'origin/master' 2022-07-20 09:04:35 -07:00
tom5079 3682eeaf94 Fix image not retrying 2022-07-20 09:04:23 -07:00
tom5079 7df2ae4ba7 Update README.md 2022-07-19 20:31:42 -07:00
tom5079 c9519ec681 Fix image not retrying 2022-07-19 20:29:39 -07:00
tom5079 b146ed684d Fix app crashing when recovering metadata is corrupt 2022-05-31 08:06:48 +09:00
tom5079 d2787c36d7 Update README.md 2022-04-24 20:39:17 +09:00
tom5079 3ff663114a 5.3.7 2022-04-24 20:39:01 +09:00
tom5079 573e62f310 5.3.7 2022-04-24 20:36:56 +09:00
tom5079 f9af670b82 Update README.md 2022-04-24 20:21:41 +09:00
tom5079 bf461475c6 Merge remote-tracking branch 'origin/master' 2022-04-24 20:20:55 +09:00
tom5079 bdea6e0cc1 Use System.currentTimeMillis() instead of Instant 2022-04-24 20:20:45 +09:00
tom5079 57f0ec4e5d Update README.md 2022-04-24 18:44:10 +09:00
tom5079 d663092363 v5.3.5 2022-04-24 18:27:56 +09:00
tom5079 edf6188e36 Merge pull request #126 from tom5079/Pupil-116
Pupil 116 Favorite tag backup
2022-04-24 18:08:13 +09:00
tom5079 f3f3395e68 Merge pull request #128 from tom5079/Pupil-127
Pupil-127 Use gg.js directly
2022-04-24 18:08:04 +09:00
tom5079 ac9dc347e3 Pupil-127 Use gg.js directly 2022-04-22 16:39:13 +09:00
tom5079 8721d85946 Show ProgressDrawable when backup 2022-04-21 17:41:06 +09:00
tom5079 a0bd1a8738 Pupil-116 Add favorite tags backup 2022-04-21 17:26:58 +09:00
tom5079 35fdf3e3b0 Update PreferenceFragments to comply with updated library 2022-04-21 16:49:13 +09:00
tom5079 aced8293f1 Dependency Update 2022-04-21 16:45:13 +09:00
tom5079 3f516faad8 AGP update 2022-04-21 16:42:34 +09:00
tom5079 824f7b9602 Merge remote-tracking branch 'origin/master' 2022-04-16 06:30:31 +09:00
tom5079 95aeeaa16f updated .gitignore 2022-04-16 06:30:10 +09:00
tom5079 63f08f0230 Fixed Downloaded folder gets deleted when opened with no network 2022-03-25 16:48:38 +09:00
tom5079 3b241fe857 Delete watchdiff.yml 2022-02-02 06:38:50 +09:00
tom5079 75bc104f43 Update watchdiff.yml 2022-02-02 05:57:55 +09:00
tom5079 30afd56324 Update README.md 2022-02-01 19:11:55 +09:00
tom5079 5ee1bb11a0 Merge remote-tracking branch 'origin/master' 2022-02-01 19:11:25 +09:00
tom5079 c1de45abce use webp by default 2022-02-01 19:10:54 +09:00
tom5079 8805033c8d Update README.md 2022-02-01 17:47:46 +09:00
tom5079 0ed59bb8a9 Merge remote-tracking branch 'origin/master' 2022-02-01 17:46:44 +09:00
tom5079 8163f2fd28 Bug fix 2022-02-01 17:46:35 +09:00
tom5079 521a65c9d2 Update README.md 2022-02-01 17:37:50 +09:00
tom5079 eb98424668 Bug fix 2022-02-01 17:36:44 +09:00
tom5079 961c731743 Merge remote-tracking branch 'origin/master' 2022-02-01 11:45:54 +09:00
tom5079 5188769fb6 Fuck hitomi 2022-02-01 11:45:45 +09:00
tom5079 8f27d9e30f Update README.md 2022-02-01 11:45:35 +09:00
tom5079 b58566999e Update README.md 2022-02-01 11:40:23 +09:00
tom5079 117d6dcd2b Fuck hitomi 2022-02-01 11:39:26 +09:00
tom5079 2608796929 Remove dumb code 2022-01-31 13:28:31 +09:00
tom5079 792f5b5a7f Fixed downloading after revisiting cached manga 2022-01-31 13:27:23 +09:00
tom5079 a77b1db749 Merge remote-tracking branch 'origin/master' 2022-01-31 13:18:28 +09:00
tom5079 9d984d92af Fixed downloading after revisiting cached manga 2022-01-31 13:17:44 +09:00
tom5079 e303f25991 Update README.md 2022-01-31 11:10:02 +09:00
tom5079 85973d2305 Merge remote-tracking branch 'origin/master' 2022-01-31 11:05:05 +09:00
tom5079 13f8d7b747 Added download database recovery 2022-01-31 11:04:52 +09:00
tom5079 e198860edb Update README.md 2022-01-31 07:39:58 +09:00
tom5079 fc8355467b Fixed autoupdate for Android 5 and 6 2022-01-31 01:46:22 +09:00
tom5079 67abc15442 Merge remote-tracking branch 'origin/master' 2022-01-31 01:03:26 +09:00
tom5079 e94cddb86a Hitomi is stupid enough to block user agent for chrome... holy shit
Added self-test and reload
Reduced update ignoring time to 1d from 1w
2022-01-31 01:02:47 +09:00
tom5079 700f7a33a5 Update README.md 2022-01-25 05:00:04 +09:00
tom5079 41e952144d Merge remote-tracking branch 'origin/master' 2022-01-25 04:59:37 +09:00
tom5079 910ed65937 Improve startup speed 2022-01-25 04:59:25 +09:00
tom5079 e06701a2fb Update README.md 2022-01-25 04:30:24 +09:00
tom5079 62dce26c73 Merge remote-tracking branch 'origin/master' 2022-01-25 04:28:16 +09:00
tom5079 ac0cff62d4 Ask user to update WebView when es2020 is not supported 2022-01-25 04:28:04 +09:00
tom5079 655c060814 Drop Guava from dependency 2022-01-22 10:00:28 +09:00
tom5079 36d27895e7 Update README.md 2022-01-21 17:11:03 +09:00
tom5079 803481f74c Merge remote-tracking branch 'origin/master' 2022-01-21 17:08:57 +09:00
tom5079 b3ca1686e3 5.2.19
Improved error report
Lenient JSON decoding
2022-01-21 17:08:49 +09:00
tom5079 8f220eb0cb Update README.md 2022-01-20 19:42:41 +09:00
tom5079 51d5f42e8b Merge remote-tracking branch 'origin/master' 2022-01-20 19:41:22 +09:00
tom5079 8d8c5ace61 Fixed {} 2022-01-20 19:41:10 +09:00
tom5079 4bb6b8ccc9 Update README.md 2022-01-20 18:06:28 +09:00
tom5079 6bebd36e83 Merge remote-tracking branch 'origin/master' 2022-01-20 18:05:27 +09:00
tom5079 edc7053e50 Optimize Firebase 2022-01-20 18:05:18 +09:00
tom5079 55e6ef5f78 Update README.md 2022-01-20 16:06:26 +09:00
tom5079 9781d7a5dc Merge remote-tracking branch 'origin/master' 2022-01-20 16:05:31 +09:00
tom5079 b83cf87cd8 Updated proguard-rules.pro 2022-01-20 16:05:22 +09:00
tom5079 430864512d Update README.md 2022-01-20 15:58:17 +09:00
tom5079 16eeef1878 Merge remote-tracking branch 'origin/master' 2022-01-20 15:57:54 +09:00
tom5079 994d4b589b 5.2.15 Fixed thumbnail not loading 2022-01-20 15:57:43 +09:00
tom5079 43adba6f13 Update README.md 2022-01-18 18:26:14 +09:00
tom5079 e4fbd21731 Update README.md 2022-01-17 00:46:20 +09:00
tom5079 8be64745fc Fix thumbnail 2022-01-17 00:45:20 +09:00
tom5079 b66f376729 Merge remote-tracking branch 'origin/master' 2022-01-17 00:45:13 +09:00
tom5079 cc40416e1e Improved loading speed
Fixed images not loading
2022-01-17 00:35:15 +09:00
tom5079 5073352366 Update README.md 2022-01-16 11:29:36 +09:00
tom5079 9ae12a2c4c Merge remote-tracking branch 'origin/master' 2022-01-16 11:29:21 +09:00
tom5079 843b8412a9 5.2.13 Fixed thumbnails not loading 2022-01-16 11:29:06 +09:00
tom5079 4f67578371 Update README.md 2022-01-11 17:16:20 +09:00
tom5079 37f2227093 Merge remote-tracking branch 'origin/master' 2022-01-11 17:12:10 +09:00
tom5079 1833c0bde5 5.1.12 Improved suggestion loading speed / Fixed images not loading 2022-01-11 17:11:59 +09:00
tom5079 aa3aeca3f2 Update README.md 2022-01-11 12:25:43 +09:00
tom5079 152d4e248f Removed runBlocking from codebase 2022-01-11 12:21:43 +09:00
tom5079 7461c8d201 Merge remote-tracking branch 'origin/master' 2022-01-09 00:34:38 +09:00
tom5079 0902fdf981 Improved search speed 2022-01-09 00:34:29 +09:00
tom5079 0fd2cf4fd7 Removed logs 2022-01-08 18:33:48 +09:00
tom5079 679558106f Update README.md 2022-01-08 10:20:00 +09:00
tom5079 e498efc493 Fixed Download location dialog keep popping up 2022-01-08 10:13:20 +09:00
tom5079 74bbc71741 Fixed thumbnail not loading 2022-01-08 10:06:45 +09:00
tom5079 502b4890e3 5.2.8 Fix for loading not finishing 2022-01-07 18:47:07 +09:00
tom5079 dfb60461e4 Merge remote-tracking branch 'origin/master' 2022-01-05 20:20:08 +09:00
tom5079 bd6bc418e6 5.2.8-BETA01 potential fix for loading not finishing 2022-01-05 20:19:00 +09:00
tom5079 a284143ce1 Update README.md 2022-01-04 23:18:16 +09:00
tom5079 1f1c782772 5.2.7 Fix app crashing on Android 12 2022-01-04 23:15:34 +09:00
tom5079 5c0f5fe333 5.2.6 Dependency update & Fixes the bug (The problem was kotlinx.serialization!!!) 2022-01-04 22:50:16 +09:00
tom5079 748e023fde 5.2.5 Added logging to fix app crashing 2022-01-04 20:30:45 +09:00
tom5079 30104bacd2 Update README.md 2022-01-04 20:16:41 +09:00
tom5079 f33d1a1bfa 5.2.4 Added logging to fix app crashing 2022-01-04 20:16:04 +09:00
tom5079 3c08331441 5.2.3 Added logging to fix app crashing 2022-01-04 19:57:00 +09:00
tom5079 3eaa38247b 5.2.2 Fixed app crashing 2022-01-04 19:10:58 +09:00
tom5079 304ce643f9 Update README.md 2022-01-03 17:15:56 +09:00
tom5079 b4ad994f95 Create watchdiff.yml 2022-01-03 15:36:00 +09:00
tom5079 03c5cfa791 Fixed image not loading 2022-01-03 14:46:22 +09:00
tom5079 e8056072b8 Merge remote-tracking branch 'origin/master' 2022-01-03 14:31:50 +09:00
tom5079 d134639a5f Update README.md 2022-01-03 11:45:55 +09:00
tom5079 b4745d76b8 Update README.md 2022-01-03 09:18:38 +09:00
tom5079 c5fd674020 User-Agent 2022-01-03 00:00:37 +09:00
tom5079 9b821dd7cb Update README.md 2022-01-02 23:49:58 +09:00
tom5079 1b441f6aea Migrate to coroutine 2022-01-02 20:32:00 +09:00
tom5079 213902c854 Update README.md 2022-01-02 16:46:54 +09:00
tom5079 2054922586 Update README.md 2022-01-02 16:46:43 +09:00
tom5079 a17b7355f5 Merge remote-tracking branch 'origin/master' 2022-01-02 15:30:20 +09:00
tom5079 066a1e1f3a use WebView(!) as a js engine 2022-01-02 15:30:03 +09:00
tom5079 b10cbfbd63 Update README.md 2022-01-02 15:18:11 +09:00
tom5079 fcd72bb8bd Revert back to quickjs-android (quickjs stackoverflows) 2022-01-02 09:16:28 +09:00
tom5079 37cd99731c Fixed images not loading 2022-01-02 09:08:53 +09:00
tom5079 ed97773f24 Update README.md 2022-01-01 16:58:31 +09:00
tom5079 0424ba3e87 Merge remote-tracking branch 'origin/master' 2022-01-01 16:58:08 +09:00
tom5079 9539c4e7bf Fixed some images not loading 2022-01-01 16:57:55 +09:00
tom5079 248b378f01 Fixed some images not loading 2022-01-01 16:56:15 +09:00
tom5079 1c40575665 Fixed images not loading 2022-01-01 08:34:47 +09:00
tom5079 ac67c648be Update README.md 2022-01-01 02:07:12 +09:00
tom5079 42cc026acc Merge remote-tracking branch 'origin/master' 2021-12-31 15:37:37 +09:00
tom5079 23a74edfad Forgot to change version 2021-12-31 15:37:29 +09:00
tom5079 5da1804f17 Update README.md 2021-12-31 15:33:21 +09:00
tom5079 75f0c35017 Merge remote-tracking branch 'origin/master' 2021-12-31 15:29:05 +09:00
tom5079 0e6b02d260 Dependency update 2021-12-31 15:28:44 +09:00
tom5079 d5a0ce55f0 Update README.md 2021-12-31 14:47:28 +09:00
tom5079 09fc6fe8ef Merge remote-tracking branch 'origin/master' 2021-12-31 14:40:45 +09:00
tom5079 ff30be879a Dependency update 2021-12-31 14:40:31 +09:00
tom5079 309fe4d831 Update README.md 2021-12-29 20:28:52 +09:00
tom5079 dff0c817a7 Merge remote-tracking branch 'origin/master' 2021-12-29 20:28:38 +09:00
tom5079 04313981d4 5.1.22 Fixed gallery thumbnail not visible 2021-12-29 20:28:18 +09:00
tom5079 810cb4d13a Update README.md 2021-12-29 11:37:02 +09:00
tom5079 969e32e744 Dependency Update 2021-12-29 11:36:16 +09:00
tom5079 980909df9b Update README.md 2021-12-17 01:21:29 +09:00
tom5079 e6753088a4 User-Agent hack
Fixes unable to download some images
2021-12-13 10:46:57 +09:00
tom5079 cbdb6cb63a Update README.md 2021-12-12 20:08:20 +09:00
tom5079 3cdf1a899e Potential Image load fail fix 2021-12-12 20:06:23 +09:00
tom5079 c796be5de5 nvm 2021-11-24 16:05:11 +09:00
tom5079 db301cb0c3 Merge branch 'master' of github.com:tom5079/Pupil 2021-11-24 16:03:52 +09:00
tom5079 f00421ef23 state.jpg 2021-11-24 16:03:42 +09:00
tom5079 b324654967 Update README.md 2021-11-03 09:50:07 +09:00
tom5079 aa10ada3ee Dependency update 2021-11-03 09:42:12 +09:00
tom5079 10c97987fb Aligned with new hitomi.la image servers 2021-10-30 08:52:10 +09:00
tom5079 b532615bbd Aligned with new hitomi.la image servers 2021-10-29 16:55:12 +09:00
tom5079 3066f41af3 Update README.md 2021-10-28 08:33:35 +09:00
tom5079 0c401c6741 Merge remote-tracking branch 'origin/master' 2021-10-28 08:32:45 +09:00
tom5079 1a21d1c937 Aligned with new hitomi.la image servers 2021-10-28 08:30:59 +09:00
tom5079 525b49a5c9 Update README.md 2021-10-25 22:07:12 +09:00
tom5079 34c074bf7b Built APK 2021-10-25 09:33:25 +09:00
tom5079 b4dc961cdc Aligned with new hitomi.la image servers 2021-10-25 09:32:05 +09:00
tom5079 93374d2cfe Updated gradlew permission 2021-09-14 00:39:35 +09:00
tom5079 4009b10549 Align with hitomi image server 2021-08-11 22:22:35 +09:00
tom5079 db1864205f Merge remote-tracking branch 'origin/master' 2021-07-23 22:11:36 +09:00
tom5079 bf39ccabbd Fixed images not showing up 2021-07-23 22:11:28 +09:00
tom5079 0e8e7767ee Update README.md 2021-07-23 22:10:02 +09:00
tom5079 5b6c86e34f Fixed images not showing up 2021-07-23 22:07:18 +09:00
tom5079 6bbaca3686 Update README.md 2021-07-23 21:52:35 +09:00
tom5079 35eae90df1 Updated README.md 2021-07-23 21:51:38 +09:00
tom5079 488d43e076 Merge remote-tracking branch 'origin/master' 2021-07-23 21:50:25 +09:00
tom5079 7c5e93c171 Merge branch 'dev' 2021-07-23 21:49:18 +09:00
tom5079 a20ef783e1 Fixed thumbnail not visible 2021-07-23 21:36:41 +09:00
tom5079 8ae0dce0ed Update README.md 2021-07-10 12:36:42 +09:00
tom5079 44aea606b7 resigned apk 2021-07-09 18:22:53 +09:00
tom5079 a05dc8c661 Alignment with changed hitomi.la image server 2021-07-09 18:03:57 +09:00
tom5079 1f80e36017 Check update onResume() instead of onCreate() 2021-07-03 16:25:08 +09:00
tom5079 1efca40744 Dependency update & report savedset io exception 2021-07-03 16:22:52 +09:00
tom5079 86e3131afa Update README.md 2021-06-18 07:43:58 +09:00
tom5079 4910b4a4b0 Update README.md 2021-06-14 08:28:58 +09:00
tom5079 9c7320c0a0 Fix app crashing 2021-06-12 16:02:38 +09:00
tom5079 02c17c3b75 Potential fix for UpdateBroadcastReceiver 2021-06-12 15:47:23 +09:00
tom5079 49a47f4b4f 5.1.9-hotfix1 2021-06-08 20:05:16 +09:00
tom5079 68280f4a62 Update README.md 2021-06-08 20:02:03 +09:00
tom5079 0e3669b247 Update README.md 2021-06-08 14:03:02 +09:00
tom5079 4c9aa29d46 Fixed Downloaded folder showing up as not downloaded 2021-06-08 12:01:16 +09:00
tom5079 66fbf10f2d Update README.md 2021-06-08 09:19:49 +09:00
tom5079 15ad806eb8 Update README.md 2021-06-08 09:19:35 +09:00
tom5079 b7f80b9c82 5.1.9 2021-06-08 09:18:20 +09:00
tom5079 9b511d2f8f Fixed radio button acting up 2021-06-08 09:08:24 +09:00
tom5079 6ebce2deb3 Dependency update 2021-06-08 08:48:05 +09:00
tom5079 95dade13f4 Dependency update 2021-05-18 10:57:36 +09:00
tom5079 ba4449d003 Fixed Proxy dialog 2021-04-04 08:22:55 +09:00
tom5079 7632fe5e86 Dependency update 2021-02-18 10:03:51 +09:00
tom5079 2c56bcacee Dependency update & Apk build 2021-02-17 18:09:13 +09:00
tom5079 c8202db3c6 Merge remote-tracking branch 'origin/dev' into dev 2021-02-17 17:44:54 +09:00
tom5079 223d689b0c Merge pull request #115 from tom5079/issue-112
Pupil-112 [Feature request] Add the ability to manage the maximum parallel downloads
2021-02-17 17:44:32 +09:00
tom5079 4f0e7d9696 Dependency update 2021-02-17 17:44:14 +09:00
tom5079 f4ce911de9 Pupil-112 [Feature request] Add the ability to manage the maximum parallel downloads
Dependency update
2021-02-16 16:57:23 +09:00
tom5079 d0ad7effa0 Updated README.md 2021-02-13 18:14:18 +09:00
tom5079 a032beecbf Merge remote-tracking branch 'origin/master' 2021-02-13 18:13:52 +09:00
tom5079 46ec9e48d9 (Android 11) Show warning when the download folder is set to app internal space 2021-02-13 18:12:45 +09:00
tom5079 26bcef1cc0 Fixed Related gallery not showing up on GalleryDialog 2021-02-13 17:51:18 +09:00
tom5079 bfb2f44f8f Fixed favorite tag duplication 2021-02-13 17:43:44 +09:00
tom5079 28b19b6774 migration bug fixed 2021-01-13 09:49:49 +09:00
tom5079 8d72f4a3aa Update README.md 2021-01-12 12:55:50 +09:00
tom5079 9c62e0399d Update README.md 2021-01-12 12:43:09 +09:00
tom5079 65ea09854e Fixed Bug occuring on Android 11 2021-01-12 12:40:21 +09:00
tom5079 9f9a4c81b3 migrated to ViewBinding 2020-11-29 14:01:56 +09:00
tom5079 d567b30f4b Fixed typo & Built apk 2020-11-29 14:01:56 +09:00
tom5079 6d7c4ce0ab Fixed show extra tags button not showing up & version up 2020-11-29 14:01:51 +09:00
tom5079 e062b8f9e9 Implemented proper Page Turn without relying on RecyclerView 2020-11-29 14:01:46 +09:00
tom5079 08403b7a4e fixed gallery import 2020-11-29 14:01:41 +09:00
tom5079 c6ed5d35e7 ProgressCard 2020-11-29 14:01:25 +09:00
tom5079 dba3460b60 Fixes unable to recursively delete when the download folder is not not SAF based 2020-11-29 14:01:09 +09:00
tom5079 f07f624fcf search bug fix 2020-10-25 00:15:21 +09:00
tom5079 48ff2f328f search bug fix 2020-10-24 23:55:50 +09:00
tom5079 9ae2423a40 search bug fix 2020-10-24 23:05:11 +09:00
tom5079 2bc3c78c75 search bug fix 2020-10-24 23:04:49 +09:00
tom5079 18e9fe75fb hiyobi.me fix 2020-10-24 11:48:14 +09:00
tom5079 880a741a44 hiyobi.me fix 2020-10-24 11:25:16 +09:00
tom5079 2c6ddcc64b hitomi.la image not loading fix 2020-10-21 14:42:07 +09:00
tom5079 8f2e757b77 Update README.md 2020-10-15 15:53:30 +09:00
tom5079 ff177955b3 Update README.md 2020-10-15 15:49:07 +09:00
tom5079 8bb8066a98 Apk built 2020-10-15 14:37:13 +09:00
tom5079 2747ddbf65 Adjust gallery_id margin 2020-10-15 14:32:36 +09:00
tom5079 b939e9424d Translate tag by default 2020-10-15 14:29:22 +09:00
tom5079 fb9dea5d1e Copy galleryID by clicking galleryblock_id 2020-10-15 12:52:38 +09:00
tom5079 da4d5d711b Prefetch
Resolves #109
2020-10-15 10:20:36 +09:00
tom5079 331cbec5f1 Bug fix 2020-10-14 18:36:36 +09:00
tom5079 7f02284285 Update README.md 2020-10-14 00:26:06 +09:00
tom5079 ac2c3a6d97 Merge remote-tracking branch 'origin/master' into master 2020-10-14 00:25:44 +09:00
tom5079 c3bc80fec6 Bug fix 2020-10-14 00:24:38 +09:00
tom5079 09779a0710 Update README.md 2020-10-13 23:47:56 +09:00
tom5079 e82c6ef866 App built
Possible build time optimization
2020-10-13 23:40:53 +09:00
tom5079 861ae9be64 Merge remote-tracking branch 'origin/dev' into dev 2020-10-13 23:34:28 +09:00
tom5079 96108bc1ec Improves Scroll Jitter 2020-10-13 23:34:16 +09:00
tom5079 016f217db0 Merge pull request #108 from klx7007/patch-1
Fix FloatingSearchView imeOptions to only affect keyboard visibility
2020-10-13 23:05:34 +09:00
tom5079 0688294f18 Dependency update
Support non external storage document Uris

Support non external storage document Uris
2020-10-13 22:59:29 +09:00
klx7007 9ad008255d FloatingSearchView imeOptions 수정
imeOption을 덮어씌워서 search할때 키보드만 숨겨짐
2020-10-13 22:58:13 +09:00
tom5079 4c5a862dd6 Update README.md 2020-10-13 17:57:19 +09:00
tom5079 b165a2308f Merge remote-tracking branch 'origin/master' into master 2020-10-13 17:13:10 +09:00
tom5079 8757b08cd2 Fixed pagecount not showing up 2020-10-13 17:12:53 +09:00
tom5079 3800543fba Update README.md 2020-10-13 13:59:02 +09:00
tom5079 02ef60c818 Update README.md 2020-10-13 13:57:23 +09:00
tom5079 88f3b30266 Merge branch 'dev' into master 2020-10-13 13:52:34 +09:00
tom5079 9203dc0112 Tag translation 2020-10-13 13:51:53 +09:00
tom5079 4c683bec68 Dependency update
Fixes concurrentmodificationexception
2020-10-13 08:34:04 +09:00
tom5079 0cfd1eb453 Update README.md 2020-10-04 23:05:30 +09:00
tom5079 19744dab37 Merge remote-tracking branch 'origin/master' into master 2020-10-04 23:04:30 +09:00
tom5079 12d58e5aa7 Don't cancel download onPause 2020-10-04 23:04:12 +09:00
tom5079 e46dd37a26 Update README.md 2020-10-04 22:47:45 +09:00
tom5079 49c3ebc36b Concurrency issue fixed
Don't cancel download onPause
Limit folder length to 127 characters
2020-10-04 22:44:31 +09:00
tom5079 11e9bc2235 Added five entries per page option 2020-10-04 20:39:33 +09:00
tom5079 3029b3bf0e Update README.md 2020-10-03 20:20:41 +09:00
tom5079 9a6c6f67ce Merge branch 'dev' into master 2020-10-03 20:18:53 +09:00
tom5079 a6ed0baef2 Fix auto cache cleanup 2020-10-03 20:18:20 +09:00
tom5079 d3b43d80da Update README.md 2020-10-03 10:06:17 +09:00
tom5079 46d4316d49 Merge remote-tracking branch 'origin/master' into master 2020-10-03 10:05:30 +09:00
tom5079 ade2864351 Fix auto cache cleanup 2020-10-03 10:03:57 +09:00
tom5079 365fc56e9d Update README.md 2020-10-02 13:09:46 +09:00
tom5079 54a5cd21ea Merge branch 'dev' into master 2020-10-02 13:00:02 +09:00
tom5079 38c0399b09 App built 2020-10-02 12:59:32 +09:00
tom5079 2b67858453 Auto cache clean 2020-10-02 12:51:59 +09:00
tom5079 87fdbdbb6e Open GalleryDialog first instead of opening Reader directly 2020-10-02 00:19:56 +09:00
tom5079 bab77a4116 (KO) Added support link 2020-10-02 00:13:34 +09:00
tom5079 d20756ab96 Reset security mode 2020-10-01 22:51:52 +09:00
tom5079 dc75a753c3 Minimum thumbnail height 2020-10-01 22:46:03 +09:00
tom5079 4712d47903 Show 10 tags maximum 2020-10-01 22:20:49 +09:00
tom5079 c5561801e1 Add group name to GalleryBlock 2020-10-01 21:32:42 +09:00
tom5079 5c259fa07a Dependency update
Fixed duplicated download file
Better download progress update handling

TODO: Add group name to GalleryBlock
2020-10-01 21:24:32 +09:00
tom5079 60e8b18702 Update README.md 2020-09-29 16:53:15 +09:00
tom5079 a8317824a9 Merge remote-tracking branch 'origin/master' into master 2020-09-27 21:40:32 +09:00
tom5079 0c3c78cc72 Fixed app crashing when loading thumbnail 2020-09-27 21:40:22 +09:00
tom5079 cfd4a8faac Update README.md 2020-09-27 21:39:05 +09:00
tom5079 7f3fb0db0d Update README.md 2020-09-27 20:30:47 +09:00
tom5079 385d3f0d1b Update README.md 2020-09-27 20:29:50 +09:00
tom5079 8fa6bd12a2 Update README.md 2020-09-27 20:27:29 +09:00
tom5079 57c2004e46 Update README.md 2020-09-27 20:21:45 +09:00
tom5079 c6b069bbfb Update README.md 2020-09-27 20:19:53 +09:00
tom5079 c18bffd08f Fixed app crashing when thumbnail is null 2020-09-27 20:18:04 +09:00
tom5079 47ec181439 Fixed app crashing when thumbnail is null 2020-09-27 20:15:43 +09:00
tom5079 90ad40b1b7 Update README.md 2020-09-27 19:32:18 +09:00
tom5079 4d3f20cf98 Update README.md 2020-09-27 19:31:30 +09:00
tom5079 86df9d52bc Update README.md 2020-09-27 19:15:46 +09:00
tom5079 1bd025e070 Fixed ProxyDialog not showing up 2020-09-27 15:09:19 +09:00
tom5079 86ee239c71 App built 2020-09-27 14:39:47 +09:00
tom5079 27d0c01e1f Don't refresh onResume 2020-09-27 14:37:16 +09:00
tom5079 7a9507be01 Somewhat working 2020-09-27 14:29:02 +09:00
tom5079 1490035893 Does not work 2020-09-27 10:04:26 +09:00
tom5079 a6afcb0ed0 Consistent usage of quotation marks 2020-09-26 22:41:51 +09:00
tom5079 ea7e8584cb Consistent usage of quotation marks 2020-09-26 22:36:48 +09:00
tom5079 608c6e6a1d App built 2020-09-26 21:01:36 +09:00
tom5079 bb2c91145f Dependency update 2020-09-26 20:58:46 +09:00
tom5079 db074df0f7 Fixed Download Concurrency issue
Fixed image not showing up after reader is paused and resumed
2020-09-26 11:07:35 +09:00
tom5079 f7c45df9a6 Tag favorite bug fix 2020-09-26 09:36:20 +09:00
tom5079 44e3d16cd6 Merge branch 'dev' into master 2020-09-26 09:08:29 +09:00
tom5079 a973cdfe0b Download Bug fix
Added favorite to TagChip
Improved eyeblink recognition
2020-09-26 09:07:52 +09:00
tom5079 fca42c79a8 Updated startActivityForResult to launchers 2020-09-25 15:39:07 +09:00
tom5079 f236775599 Bug fix
Remember thin mode preference
TagChip favorites
2020-09-25 15:17:05 +09:00
tom5079 360decd37c FloatingSearchView migration 2020-09-16 14:31:45 +09:00
tom5079 998433479b Merge branch 'dev' into master 2020-09-15 23:20:01 +09:00
tom5079 c7e75aacf0 Layout fix
History fix
2020-09-15 23:19:26 +09:00
tom5079 690338273a Merge branch 'dev' into master 2020-09-15 02:42:33 +09:00
tom5079 4207ea494d Bug fix 2020-09-15 02:42:18 +09:00
tom5079 265473a15a Merge branch 'dev' into master
# Conflicts:
#	app/release/app-release.apk
#	app/release/output-metadata.json
2020-09-15 02:13:53 +09:00
tom5079 b907d36770 Bug fix 2020-09-15 02:13:25 +09:00
tom5079 fee280341a Blink Recognition 2020-09-15 01:12:29 +09:00
tom5079 0f1ef70752 Bug fix 2020-09-14 22:34:51 +09:00
tom5079 0f8c68b22e Fixed to work on old Androids 2020-09-13 21:42:02 +09:00
tom5079 701017d2ca Merge branch 'face-recog' into dev 2020-09-13 21:10:29 +09:00
tom5079 be6903ca12 App built 2020-09-13 16:24:23 +09:00
tom5079 1521bc1223 Downloader Bug fix
UI Optimized
Scroller autohide, track disable
2020-09-13 16:19:32 +09:00
tom5079 7ed66b827f Implemented eye recognition
TODO: Move pages according to eye blinking
2020-09-12 20:25:55 +09:00
tom5079 df3a478ef3 Bug fix 2020-09-12 20:22:34 +09:00
tom5079 974ddf69d5 Bug fix 2020-09-12 19:33:13 +09:00
tom5079 56a91268de Fixed fastscroll 2020-09-12 19:10:15 +09:00
tom5079 3dda2f9a1c Dependency update 2020-09-12 12:35:10 +09:00
tom5079 ed20456f9f VD Optimization 2020-09-12 12:17:02 +09:00
tom5079 281d4a0023 Adjusted Fastscroll UI
VD Optimized
2020-09-12 11:23:38 +09:00
tom5079 2170403662 Fixed Image UI 2020-09-12 10:32:23 +09:00
tom5079 b1c1e96135 Smol fix 2020-09-11 20:45:31 +09:00
tom5079 a8de1429c1 Bug fix 2020-09-11 19:53:49 +09:00
tom5079 3ba6cb81ae Bug fix 2020-09-11 19:40:56 +09:00
tom5079 acc85da80f Bug fix 2020-09-10 22:47:57 +09:00
tom5079 b53de8624d Bug fix 2020-09-10 22:45:27 +09:00
tom5079 6e2eeb29cc Bug fix 2020-09-10 21:41:57 +09:00
tom5079 62eb28ac01 Bug fix 2020-09-10 19:44:08 +09:00
tom5079 fd298529bf Memory usage optimization 2020-09-10 19:16:42 +09:00
tom5079 297ce506b1 Bug fix 2020-09-10 17:03:17 +09:00
tom5079 18c6954be3 Improved Suggestions
resolves #100
2020-09-10 16:50:26 +09:00
tom5079 cea3fb1e65 Bug fix 2020-09-09 16:58:01 +09:00
tom5079 7f274fd238 Added OSS Notice 2020-09-09 13:06:32 +09:00
tom5079 439a8e93ec App built 2020-09-09 11:25:53 +09:00
tom5079 83801feee9 Bug fix 2020-09-09 11:23:22 +09:00
tom5079 8a6860c96e Import cleanup 2020-09-09 09:29:33 +09:00
tom5079 5c959f2987 Bug fix 2020-09-09 09:29:33 +09:00
tom5079 4e4397287a Implemented fast scroll 2020-09-09 09:22:17 +09:00
tom5079 fe02abc9e8 Bug fix 2020-09-08 20:04:12 +09:00
tom5079 59347ab317 Bug fix 2020-09-08 19:16:15 +09:00
tom5079 f408a91176 Bug fix 2020-09-07 10:00:10 +09:00
tom5079 6f6956ce27 Fixed DownloadLocationDialogFragment keep showing up when any button is clicked 2020-09-06 17:19:18 +09:00
tom5079 4ecad8eccc Fixed migration 2020-09-05 18:31:53 +09:00
tom5079 486fbe46a0 Fixed migration 2020-09-05 18:11:20 +09:00
tom5079 1ddb636dd0 Fixed migration 2020-09-05 18:00:15 +09:00
tom5079 081c890b4e Bug fix 2020-09-05 12:51:41 +09:00
tom5079 86d528ba13 v5.0-beta1 2020-09-05 09:13:03 +09:00
tom5079 6bda3cb75a Performance improvement 2020-09-05 08:57:10 +09:00
tom5079 12d8949c9e Fixed context not attached error 2020-09-05 08:31:30 +09:00
tom5079 ffc7c2aa67 Bug fix 2020-09-04 11:05:29 +09:00
tom5079 5ec67488eb Bug fix 2020-09-04 07:51:55 +09:00
tom5079 be64703d3c Minor bug fix 2020-09-03 18:28:40 +09:00
tom5079 705925a050 Migration bug fix 2020-09-03 15:49:04 +09:00
tom5079 29665be34d Added Migration 2020-09-03 10:54:07 +09:00
tom5079 1edf986acf Added Download Folder Dialog 2020-09-02 21:59:17 +09:00
tom5079 37be8ccf7f Bug fix 2020-09-02 20:15:26 +09:00
tom5079 ead68b5201 Moved storage managing settings to another fragment 2020-09-02 13:28:05 +09:00
tom5079 4409664698 nomedia 2020-09-02 13:05:36 +09:00
tom5079 fc6bc7965c Added download folder name change 2020-09-02 12:58:31 +09:00
tom5079 f70eccb1da Created TagChip.kt 2020-09-02 12:29:34 +09:00
tom5079 861994e804 Fixed crash when download folder is changed 2020-09-02 12:15:37 +09:00
tom5079 2b8facfb97 End service when completed
Auto redownload
2020-09-02 11:03:46 +09:00
tom5079 9583897ada working 2020-09-02 00:13:25 +09:00
tom5079 7704c96955 what i got so far 2020-09-01 18:07:16 +09:00
tom5079 c96d609803 Created new cache/downloader 2020-08-31 11:41:12 +09:00
tom5079 aa0e5000ab Deleted redundant code 2020-08-30 20:12:06 +09:00
tom5079 7ca4418a50 Added global preferences object 2020-08-30 19:52:51 +09:00
tom5079 fdd9b02388 (Almost) Full OkHTTP implementation 2020-08-28 22:43:47 +09:00
tom5079 ece127e982 Fixed downloader not fully cancelled after DownloadWorker.cancel() is called 2020-08-28 21:51:44 +09:00
tom5079 5488e14f32 Moved history adding code to ReaderActivity.kt 2020-08-26 23:47:07 +09:00
tom5079 3558d826fb Implemented new favorite backup/restore feature 2020-08-26 23:40:36 +09:00
tom5079 68c94d1d8b Removed old features 2020-08-26 20:00:30 +09:00
tom5079 1a4ae5dfc6 Dependency update 2020-08-26 19:19:26 +09:00
tom5079 1a95afe266 Implemented Right-to-Left pageturn 2020-08-26 18:47:27 +09:00
tom5079 6579db3cc8 Added Search all galleries feature 2020-08-26 18:36:59 +09:00
tom5079 ceac01533a Updated History.kt to use kotlin's delegate feature 2020-08-26 18:01:12 +09:00
tom5079 216914882c Separated libpupil to standalone repository
Migrated to Kotlin 1.4
2020-08-23 20:26:23 +09:00
tom5079 735dbab695 Build optimization 2020-08-10 01:53:11 +09:00
tom5079 dbaab152ef Build optimization 2020-08-10 01:32:56 +09:00
tom5079 9da1b30984 i'm dumb 2020-08-08 16:29:04 +09:00
tom5079 9415ab4ef9 Fixed some images crashing
Added auto pageturn timer
2020-08-08 15:55:17 +09:00
tom5079 647294daf2 what were i thinking?! 2020-08-04 17:50:07 +09:00
tom5079 6ebc386474 Fixed app crashing when deleting cache/download 2020-08-04 12:14:14 +09:00
tom5079 3e657bdc09 Merge branch 'dev' 2020-08-03 21:54:28 +09:00
tom5079 0b0adb76a1 Merge branch 'master' into dev
# Conflicts:
#	app/build.gradle
#	app/release/app-release.apk
#	app/release/output-metadata.json
2020-08-03 21:54:14 +09:00
tom5079 17b3e010aa fuck git 2020-08-03 21:49:04 +09:00
tom5079 20003acd73 App built
resolves #98
2020-08-03 21:34:24 +09:00
tom5079 2ab7672092 Search Backtracking Added 2020-08-03 21:31:39 +09:00
tom5079 c317abe64b Open Gallery Info dialog instead of opening up the gallery when opening a random gallery 2020-08-03 21:19:08 +09:00
tom5079 bc33ce1ebc Fix Settings opening up too late if the download folder is too big 2020-08-03 21:14:47 +09:00
Pupil 684c5cf38b Merge pull request #105 from tom5079/dev
4.19-hotfix2
2020-08-03 02:10:17 +09:00
tom5079 c34e15f0a1 Fixed image corruption when not using cache 2020-08-03 02:06:37 +09:00
Pupil bad004f892 Merge pull request #104 from tom5079/dev
Version 4.19-hotfix1
2020-08-02 17:48:32 +09:00
tom5079 828d3de020 Fixed app crashing between android version 5.0 and 5.1 2020-08-02 17:45:24 +09:00
tom5079 132b3b9be1 Unable to fetch thumbnails fixed 2020-07-29 10:53:50 +09:00
Pupil 388bc6fda5 Merge pull request #103 from tom5079/Pupil-99
resolves #99
2020-07-29 10:28:01 +09:00
tom5079 a93edc184d resolves #99 2020-07-23 22:42:38 +09:00
tom5079 08672d10ac oops 2020-07-23 20:48:24 +09:00
tom5079 b563dae3a8 App rebuilt 2020-07-23 20:37:38 +09:00
tom5079 917f9672dd bug fix - unable to run on older devices
Version 4.18.4
2020-07-23 20:32:45 +09:00
Pupil 9ddb19530b Merge pull request #101 from tom5079/dev
Version 4.18.3
2020-07-12 20:09:12 +09:00
tom5079 431e56a9f1 Version 4.18.3 2020-07-12 20:07:59 +09:00
Pupil 71093aac4c Update README.md 2020-07-12 19:53:28 +09:00
tom5079 47c9e8127e Remove logic for resetting low quality setting 2020-07-07 10:21:30 +09:00
tom5079 24b801b346 resolves #52 2020-07-05 19:45:55 +09:00
tom5079 70608c3ed9 resolves #52 2020-07-05 19:40:14 +09:00
tom5079 f185196e85 Version Update 2020-07-05 19:33:56 +09:00
tom5079 a8766a8bbe Drawer logo fixed 2020-06-23 20:37:20 +09:00
Pupil 27a8c93cfe Merge pull request #97 from tom5079/Pupil-95
Pupil 95
2020-06-23 18:49:57 +09:00
tom5079 a3cd29fda9 Merge remote-tracking branch 'origin/Pupil-95' into Pupil-95 2020-06-23 18:48:24 +09:00
tom5079 adda8ab640 Pupil-95 Search tag icon not visible in light theme 2020-06-23 18:48:13 +09:00
tom5079 1538ea5fc8 Merge remote-tracking branch 'origin/dev' into dev 2020-06-23 18:47:58 +09:00
tom5079 2367a97a54 App built 2020-06-23 18:47:48 +09:00
tom5079 090ec0e4af Auto-Retry
Bug fix
2020-06-23 18:47:48 +09:00
tom5079 de7f552e5c Pupil-95 Search tag icon not visible in light theme 2020-06-23 18:40:43 +09:00
tom5079 d763f5dca0 App built 2020-06-22 09:52:25 +09:00
tom5079 9f41116241 Auto-Retry
Bug fix
2020-06-22 09:48:04 +09:00
Pupil 57faada201 Merge pull request #93 from tom5079/dev
Version 4.18.1
2020-06-21 23:03:59 +09:00
tom5079 1edb95f0c5 Prevent OOM when cache is disabled 2020-06-21 23:03:10 +09:00
tom5079 9f363d8900 idk wtf i'm doin' 2020-06-21 22:43:47 +09:00
Pupil 0bf2f1b6e1 Merge pull request #92 from tom5079/dev
Version 4.18
2020-06-21 18:19:40 +09:00
tom5079 68c7a38390 Several fixes 2020-06-21 18:19:13 +09:00
tom5079 841c8a7a15 Download Retry Button Added 2020-06-21 18:12:46 +09:00
Pupil 6c9688183b Merge pull request #91 from tom5079/Pupil-90
Pupil 90
2020-06-21 17:40:54 +09:00
tom5079 ccd84c91f6 Retry 5 times when failed 2020-06-21 17:40:03 +09:00
tom5079 318d6f9b52 User ID added for crash analysis 2020-06-21 17:31:46 +09:00
tom5079 8f5d612ee0 Migrate to vector image 2020-06-21 16:55:56 +09:00
tom5079 56b2a05596 SearchView Dark Theme 2020-06-21 16:30:10 +09:00
tom5079 4db0022d6a Fixed nomedia creation menu 2020-06-21 15:32:55 +09:00
Pupil 67f37d3188 Merge pull request #87 from tom5079/Pupil-77
Pupil 77
2020-06-21 15:00:39 +09:00
tom5079 ed81cc7207 APCJSA enabling dialog added 2020-06-21 15:00:05 +09:00
tom5079 065845f1be Cache disable setting added 2020-06-21 14:45:57 +09:00
tom5079 902f705e89 Added Filter 2020-06-21 11:55:34 +09:00
tom5079 ec2e0ef773 SuppressLint 2020-06-21 11:42:50 +09:00
tom5079 d28c5741d0 SuppressLint 2020-06-21 11:42:38 +09:00
Pupil e6e3f9e8f8 Merge pull request #86 from tom5079/Pupil-59
Pupil 59
2020-06-21 11:36:13 +09:00
tom5079 90e1dc59bd Disable fingerprint when all the locks are disabled 2020-06-21 11:31:37 +09:00
tom5079 0b1c9b097c Disable fingerprint when all the locks are disabled 2020-06-21 11:24:30 +09:00
tom5079 2b553d1116 Changed Title/Subtitle 2020-06-20 23:32:38 +09:00
tom5079 567eec8bc5 Added Fingerprint Lock 2020-06-20 23:23:07 +09:00
tom5079 293ca5b31d Added PIN Lock 2020-06-20 22:48:47 +09:00
Pupil 0d0f2bd827 Merge pull request #85 from tom5079/Pupil-84
Pupil-84 Title doesn't show up when using hiyobi
2020-06-20 15:28:37 +09:00
tom5079 5bc4610061 Pupil-84 Title doesn't show up when using hiyobi 2020-06-20 15:28:01 +09:00
Pupil e6b7c107f2 Merge pull request #83 from tom5079/Pupil-76
Pupil-76
2020-06-20 14:32:26 +09:00
tom5079 51a9bf2570 Pupil-76 Add Page count 2020-06-20 14:30:20 +09:00
Pupil 8385f6f390 Merge pull request #82 from tom5079/Pupil-79
Pupil-79
2020-06-20 14:05:36 +09:00
tom5079 772e9daf57 App Link Updated 2020-06-20 14:04:46 +09:00
Pupil 8adc4405c5 Merge pull request #81 from tom5079/Pupil-78
Pupil-78 Shorten the timout when hiyobi is down
2020-06-20 13:16:57 +09:00
tom5079 349da7aa81 Pupil-78 Shorten the timout when hiyobi is down 2020-06-20 13:14:09 +09:00
tom5079 01a01d481d Version up 2020-06-20 13:13:57 +09:00
tom5079 2f8445fb83 Dependency upgrade 2020-06-19 16:34:05 +09:00
tom5079 b04a5fc150 Dependency upgrade 2020-06-19 15:18:16 +09:00
Pupil bbe29941df Merge pull request #75 from tom5079/dev
Version 4.17
2020-06-15 08:20:29 +09:00
tom5079 2720e445ea Changed low quality settting to true by default 2020-06-15 08:19:16 +09:00
tom5079 49ba579a59 Random Gallery Added
Changed tag search behavior
Loading time improved for hitomi.la
Bug fixed
2020-06-14 16:53:30 +09:00
Pupil 3198c6cbfd Merge pull request #74 from tom5079/dev
Version 4.15
2020-03-25 19:02:50 -07:00
pupil b3feee6d9d Fast scroll Added
Not able to download after finished downloading to cache Fixed
Trying to move files from different threads causing exceptions Fixed
Import old galleries Added
2020-03-25 10:29:05 -07:00
Pupil f0f53e6bce Fixed - Jump to page in Reader not working 2020-03-02 20:30:26 +09:00
Pupil 24486d13f2 Bug fix
Memory usage optimization
2020-02-29 13:23:37 +09:00
Pupil 20bc9461de Merge branch 'dev_rescued' 2020-02-29 09:43:36 +09:00
Pupil c8e94cc295 Build tool update 2020-02-29 09:09:51 +09:00
Pupil b2bfb0c237 Bug fix
Update downloader changed to DownloadManager
Fixed wierd download path
Fixed Crash on MainActivity
Fixed Crash when non-integer is inputted as Gallery ID

Version 4.13
2020-02-27 19:16:38 +09:00
Pupil 0a003da724 Bug fix 2020-02-26 09:51:16 +09:00
Pupil b4f2a33016 Merge pull request #72 from tom5079/dev
Modified proguard rules to fix error occurs on Android 4
2020-02-25 22:02:48 +09:00
Pupil ee7ede2885 Modified proguard rules to fix error occurs on Android 4 2020-02-25 21:50:36 +09:00
Pupil 6abc404eb7 Merge pull request #71 from tom5079/dev
Version 4.11
2020-02-25 20:35:41 +09:00
Pupil 61afe01e36 Fixed image loading from hiyobi.me 2020-02-25 20:34:31 +09:00
Pupil c3e60f9988 Typo fixed 2020-02-25 19:19:27 +09:00
Pupil 593197cd7e Bug fix
Thin mode added
Cancel all downloads added
2020-02-25 19:17:23 +09:00
Pupil ee1592b478 Bug fix 2020-02-25 10:38:11 +09:00
Pupil dfe435c4f3 Merge pull request #70 from tom5079/dev
Version 4.9
2020-02-24 21:11:03 +09:00
Pupil 69e85f8b90 Bug fix 2020-02-24 21:10:10 +09:00
Pupil c9bde3c487 Merge pull request #69 from tom5079/dev
Version 4.8
2020-02-24 20:48:55 +09:00
Pupil 65e9557d9f Bug fix 2020-02-24 20:02:44 +09:00
Pupil 4f249c07e7 Merge pull request #68 from tom5079/dev
Version 4.7
2020-02-24 12:49:56 +09:00
Pupil 5fd35b492c Bug fix 2020-02-24 12:49:19 +09:00
Pupil 9bddf95013 Image loading fixed 2020-02-23 21:18:19 +09:00
Pupil 03444f070f App built 2020-02-23 10:40:09 +09:00
Pupil 2f1a63eb64 Confilict resolved 2020-02-23 10:32:10 +09:00
Pupil 9d0898b26c Fixed image loading bug 2020-02-23 10:30:57 +09:00
Pupil 994aa99797 Fixed image loading bug 2020-02-23 10:28:29 +09:00
Pupil 8204a15276 Proxy applied to thumbnails 2020-02-22 20:30:42 +09:00
Pupil 4a8bff0b98 Merge pull request #67 from tom5079/dev
Version 4.6
2020-02-22 11:09:19 +09:00
Pupil a4336cd954 Version 4.6 2020-02-22 11:08:30 +09:00
Pupil 4f0dbead79 Hiyobi file structure changed 2020-02-22 11:02:58 +09:00
Pupil c0e7c87ca4 Fixed image loading error 2020-02-22 09:30:24 +09:00
Pupil b967bf9a26 Merge branch 'issue-65' into dev 2020-02-21 20:44:03 +09:00
Pupil 764a265053 Image loading optimization 2020-02-21 20:11:43 +09:00
Pupil 68c2b2dbfa Update README.md
Added discord banner
2020-02-21 20:11:27 +09:00
Pupil 061f1263f4 App naming changed from beta to alpha 2020-02-17 20:33:12 +09:00
Pupil 2a27355479 App built 2020-02-17 20:31:36 +09:00
Pupil ae2a8e8ada Fixed low quality settings not affected 2020-02-17 19:56:57 +09:00
Pupil 68dcc2333b App built 2020-02-17 19:09:45 +09:00
Pupil 66fb2e9a62 Fixed ArrayIndexOutOFBoundsException 2020-02-17 18:50:58 +09:00
Pupil 1dbfc64f37 Fixed not able to load from hiyobi 2020-02-17 16:46:51 +09:00
Pupil 98d1f88579 Fixed infinite loading when there's no result 2020-02-16 22:18:31 +09:00
Pupil bb6fadc182 Fixed unending loading screen 2020-02-16 20:11:20 +09:00
Pupil ac1ca71299 Proxy implemented 2020-02-16 19:59:51 +09:00
Pupil 0d93785581 Fixed proxy not applied 2020-02-16 18:23:50 +09:00
Pupil 69a9d63e1d Proxy added 2020-02-15 12:40:10 +09:00
Pupil 5dea35343b Fixed preference bug
Version fix
2020-02-15 01:59:42 +09:00
Pupil 5c768d2121 Firebase enabled 2020-02-15 00:25:59 +09:00
Pupil 4d5834821a Fixed wrong radio button selected when download folder is not selected 2020-02-14 20:48:33 +09:00
Pupil ca077c4fee Apk built 2020-02-14 20:37:48 +09:00
Pupil 85d01f60f1 Changed galleryblock retrieve url 2020-02-14 20:31:10 +09:00
Pupil 066d73b217 Generated APK 2020-02-14 20:13:26 +09:00
Pupil ba069d8f8e Image loading optimization 2020-02-14 20:10:04 +09:00
Pupil 275684c9ce now able to install Debug and release builds in one device
Fixed shrink serialization error
2020-02-14 17:02:53 +09:00
Pupil 49d87a08d2 Set download notifications non-dismissable 2020-02-13 20:29:45 +09:00
Pupil 04c500f3d8 Improved galleryBlock loading logic 2020-02-13 20:15:17 +09:00
Pupil d05c1e4d08 Improved galleryBlock loading logic 2020-02-13 20:14:26 +09:00
Pupil bb63959678 Allow download multiple galleries concurrently 2020-02-13 20:07:16 +09:00
Pupil 842148647f Changed to log fetchGallery exceptions 2020-02-13 19:42:25 +09:00
Pupil 19308d840a Merge branch 'master' into hotfix 2020-02-12 18:51:17 +09:00
Pupil 46bd1318cd Merge branch 'master' into old 2020-02-12 18:49:35 +09:00
Pupil 9d1998fe52 deleted deleteRecursively 2020-02-12 09:03:47 +09:00
Pupil a714a8230b ugh 2020-02-11 21:23:34 +09:00
Pupil b5432cd0b4 ugh 2020-02-11 09:29:58 +09:00
Pupil 5634e94f3e DocumentFileX 2020-02-10 16:28:13 +09:00
Pupil c1a71b0db3 hotfix 2020-02-10 12:17:05 +09:00
Pupil d93e7f8834 Fixed renamed file 2020-02-09 18:26:52 +09:00
Pupil 3175b2c45c Fixed renamed file 2020-02-09 18:17:21 +09:00
Pupil 547b6e8e3b Fixed renamed file 2020-02-09 18:16:45 +09:00
Pupil d88ac27e72 Fixed renamed file 2020-02-09 18:15:46 +09:00
Pupil e551a40d08 Fixed renamed file 2020-02-09 18:13:16 +09:00
Pupil e810abe33a Bug fix 2020-02-09 17:57:18 +09:00
Pupil 6172a73719 Bug fix 2020-02-09 17:36:28 +09:00
Pupil 7455e68a45 Bug fix 2020-02-09 17:35:34 +09:00
Pupil 748495ca64 Downloader thread number to 4 2020-02-09 17:25:55 +09:00
Pupil f6d9c7f550 Bug fix
Networking optimized
2020-02-09 17:11:35 +09:00
Pupil 384e6c61b0 Fixed 'Can't locate argument-less serializer for class xyz.quaver.pupil.d.e. For generic classes, such as lists, please provide serializer explicitly.' 2020-02-08 22:16:26 +09:00
Pupil d49c9cec20 Merge pull request #64 from tom5079/development
Version 5.0
2020-02-08 20:38:51 +09:00
Pupil 4b27f1aba1 Added support for gallery unregistered in hitomi 2020-02-08 20:37:59 +09:00
Pupil a0a989c785 Added support for gallery unregistered in hitomi 2020-02-08 20:36:08 +09:00
Pupil ecaecc1b91 Added Custom download folder 2020-02-08 19:01:45 +09:00
Pupil 938156aa71 Merge pull request #58 from tom5079/issue-35
Might be a fix for #35
2020-02-03 12:01:06 +09:00
Pupil d30c51bb3a Finished integrating new downloader 2020-02-03 11:54:29 +09:00
Pupil 874606bff9 Added Download feature 2020-02-01 12:50:26 +09:00
Pupil 07643e4b4c fixed conflict 2020-01-31 11:11:34 +09:00
Pupil 20bc5423cf Merge pull request #63 from tom5079/development
Version 4.3-hotfix1
2020-01-31 10:39:06 +09:00
Pupil b84cddffdc Version up & dependency update 2020-01-31 10:32:21 +09:00
Pupil e46d1123df resolves #62 2020-01-31 10:24:19 +09:00
Pupil 48f90faf4e Applying changed Download routines 2020-01-31 10:12:44 +09:00
Pupil 615b52c4fa Merge branch 'development' into issue-35 2020-01-30 11:58:24 +09:00
Pupil 2c9c8e223c Fixes bug when trying to open hiyobi-only galleries 2020-01-30 00:01:53 +09:00
Pupil 01a653835e Deprecate GalleryDownloader 2020-01-29 20:58:20 +09:00
Pupil 9d80857a38 Rebuilding Downloader 2020-01-29 15:46:23 +09:00
Pupil 8a9ab6b36c Rebuilding Downloader 2020-01-28 12:56:32 +09:00
Pupil 4edc87c197 Rebuilding Downloader 2020-01-28 12:54:34 +09:00
Pupil 10712e6e62 Rebuilding Downloader 2020-01-28 10:48:31 +09:00
Pupil d73dc19d3d Fixed enlarged chip spacing 2020-01-24 17:02:53 +09:00
Pupil c204353220 Added mirror selector
Developing new Downloader under xyz.quaver.pupil.util.download
2020-01-24 15:11:35 +09:00
Pupil 37123a2cd5 Merge remote-tracking branch 'origin/issue-35' into issue-35
# Conflicts:
#	app/src/main/res/layout/item_reader.xml
2020-01-22 23:22:44 +09:00
Pupil a39484b6ea Might be a fix for #35
but it's quite dirty :v
2020-01-22 23:17:28 +09:00
Pupil e81b5a4e3a Added pinch-zoom 2020-01-22 23:14:57 +09:00
Pupil 0b87c57fbf Dependency update 2020-01-22 23:11:54 +09:00
Pupil 5fd985ba39 Merge pull request #61 from tom5079/Pupil-57
Pupil-57 about the horizontal and search
2020-01-22 11:45:14 +09:00
Pupil 8c64548513 Pupil-57 about the horizontal and search 2020-01-22 11:42:27 +09:00
Pupil a6de64ceb9 Some code cleanups :P #37 2020-01-22 11:21:18 +09:00
Pupil 16ebb437a3 Merge pull request #60 from tom5079/Pupil-25
Pupil-25 Add option to download jpg instead of webp files
2020-01-22 11:08:49 +09:00
Pupil 683118a3f4 Fixed old android not supporting ContentProvider 2020-01-22 11:07:55 +09:00
Pupil 08e38ed45c Pupil-25 Add option to download jpg instead of webp files 2020-01-22 10:50:55 +09:00
Pupil 7abf08f1fb Some code cleanups :P #37 2020-01-20 18:59:18 +09:00
Pupil f3019e9b84 Some code cleanups :P #37 2020-01-20 18:58:19 +09:00
Pupil 9ea55664b6 Might be a fix for #35
but it's quite dirty :v
2020-01-17 10:30:39 +09:00
Pupil c468764234 Fixed enlarged chip spacing 2020-01-16 20:37:43 +09:00
Pupil 31c3178430 Merge pull request #56 from tom5079/Pupil-54
Fixed thumbnail on gallery info
2020-01-15 11:29:58 +09:00
Pupil e81c189afc Fixed thumbnail on gallery info 2020-01-15 11:28:38 +09:00
Pupil e0ccac13c1 Forgot to handle error :P 2020-01-15 10:58:53 +09:00
Pupil 93228459d7 Fixed language selection based on locale 2020-01-13 20:53:27 +09:00
Pupil 63e07f56e0 Merge pull request #51 from tom5079/development
Version 4.3
2020-01-13 20:35:43 +09:00
Pupil ee87122bb2 Fixed Checking permission despite requiring no permission 2020-01-13 20:32:50 +09:00
tom5079 290dda9018 Added log to indicate firebase status 2020-01-13 15:25:44 +09:00
Pupil 1d3d78b936 Merge pull request #50 from tom5079/development
Version 4.2
2020-01-13 15:07:00 +09:00
Pupil a947bc6415 Merge pull request #49 from tom5079/Pupil-28
Created beta channel update feature
2020-01-13 15:05:58 +09:00
tom5079 9ca891b2f5 Changed SwitchPreference to SwitchPreferenceCompat for better integration 2020-01-13 15:02:00 +09:00
tom5079 48e0ebc8ae Pupil-28 Add option to select update channels 2020-01-13 14:43:55 +09:00
tom5079 b323353006 Merge remote-tracking branch 'origin/development' into development 2020-01-13 14:11:07 +09:00
Pupil c85d3ebe81 Merge pull request #48 from tom5079/issue-39
Added Changing Download directory feature
2020-01-13 14:09:41 +09:00
tom5079 ce843abec8 Changed logic to update app from utilizing DownloadManager to manual download 2020-01-13 14:08:31 +09:00
tom5079 6b43faa70e Fixed crash when built without google-services.json 2020-01-13 14:08:31 +09:00
tom5079 2d0c997b2e Updated build.gradle 2020-01-13 14:08:31 +09:00
tom5079 1db5118377 Updated .gitignore 2020-01-13 14:08:31 +09:00
tom5079 26b53ed7ac Fixed crash when built without google-services.json 2020-01-12 19:12:47 +09:00
tom5079 2c85ea6443 Removes Permission check for downloading updates
TODO: write logic for downloading update file instead of using DownloadManager(Permission problem)
2020-01-11 18:51:15 +09:00
tom5079 cbc2b30f47 resolves #39 2020-01-11 06:51:51 +09:00
tom5079 0b58deb92c Updated build.gradle 2020-01-04 14:01:54 +09:00
tom5079 ed1cf23c91 Updated .gitignore 2020-01-04 14:00:31 +09:00
tom5079 6fbb644e4b Added download directory entry on preferences
Changed download folder
2020-01-04 13:16:39 +09:00
Pupil 774867502d Merge pull request #47 from tom5079/issue-42
Fixed #42
2020-01-02 10:31:39 +09:00
tom5079 c8b1439aeb Fixed #42 2020-01-02 10:30:55 +09:00
tom5079 38c16adffe Fixed to be able to build without google-services.json 2020-01-02 10:18:39 +09:00
Pupil 18aede2701 Merge pull request #45 from tom5079/issue-44
issue-44
2019-12-29 14:46:13 +09:00
tom5079 c59d08a0a1 Fixes #44 2019-12-29 14:42:28 +09:00
tom5079 66ae29eb5b Fixes #44 2019-12-29 14:24:20 +09:00
tom5079 7d9cb3e150 Dependency update 2019-12-29 13:34:45 +09:00
Pupil 9922a9f82a Merge pull request #41 from tom5079/hotfix-40
Fixes #40
2019-12-19 09:37:23 +09:00
tom5079 445b9b4673 Fixes #40 2019-12-19 09:36:51 +09:00
tom5079 0ef7b358e0 Fixes #40 2019-12-19 09:33:10 +09:00
tom5079 2d3fb75576 Fixes wierd crash 2019-12-14 17:04:43 +09:00
tom5079 d55ff6d68e Fixes wierd crash 2019-12-14 17:04:04 +09:00
Pupil 079654a9c7 Merge pull request #36 from tom5079/Pupil-35
fixes #35
2019-12-14 16:56:58 +09:00
tom5079 30263c6260 fixes #35
warning: this can cause OOM
2019-12-14 16:54:59 +09:00
Pupil 3159c343c1 Merge pull request #34 from tom5079/development
Version 4.2-beta1
2019-12-13 20:10:55 +09:00
tom5079 ceaa930623 bug fix 2019-12-13 20:03:11 +09:00
tom5079 6a8539106b bug fix 2019-12-13 20:01:45 +09:00
tom5079 7a24c3c08e bug fix 2019-12-13 19:50:14 +09:00
tom5079 251abeb090 Merge remote-tracking branch 'origin/development' into development 2019-12-13 19:43:42 +09:00
Pupil a61fe9f98c Merge pull request #33 from tom5079/Pupil-29
Pupil-29
2019-12-13 19:42:44 +09:00
tom5079 d29c7bf91a Apply update on startup 2019-12-13 19:30:19 +09:00
tom5079 ed4911c441 Updated serialization library 2019-12-13 18:39:12 +09:00
tom5079 d40b4f3748 Added update logic for outdated readers 2019-12-12 20:14:55 +09:00
tom5079 f3c4fe1914 Merge remote-tracking branch 'origin/development' into development 2019-12-11 20:23:45 +09:00
tom5079 55ee841bd0 resolves #31 2019-12-11 20:23:18 +09:00
tom5079 657fb488ee fixed #31 on libpupil
#TODO: fix app side to completely resolve the issue
2019-12-11 20:23:18 +09:00
tom5079 4eef0b93fb bug fix 2019-12-11 20:23:17 +09:00
Pupil f2be56435c Merge pull request #32 from tom5079/Pupil-31 2019-12-11 20:08:45 +09:00
tom5079 fa6b3ad7ba resolves #31 2019-12-11 20:03:55 +09:00
tom5079 52c05e6888 fixed #31 on libpupil
#TODO: fix app side to completely resolve the issue
2019-12-11 19:52:25 +09:00
tom5079 865bf0ba83 Added code for differentiating readers 2019-12-09 10:33:26 +09:00
tom5079 3f827d1bad bug fix 2019-12-09 10:15:53 +09:00
tom5079 0561d5f55c Added code for saved reader 2019-12-09 09:36:36 +09:00
Pupil 1bf2e1dacc Merge pull request #30 from tom5079/Pupil-24
fixed #24
2019-12-08 18:45:21 +09:00
tom5079 db5a221b56 kotlin plugin update 2019-12-08 18:10:35 +09:00
tom5079 295285f132 Turned off development only option 2019-12-02 19:04:09 +09:00
tom5079 5052b6c074 Removed folder opening feature due to its unstability 2019-12-02 18:55:38 +09:00
tom5079 f98f45dc54 Pupil-24 Absence of backing up favorites feature 2019-12-01 16:58:29 +09:00
tom5079 8d16950f46 Issue #27 fix 2019-11-30 16:10:47 +09:00
tom5079 74033b9f4a Issue #27 fix 2019-11-30 16:10:09 +09:00
tom5079 e497d47374 Fix for bug caused by changed hiyobi domain 2019-11-30 15:10:25 +09:00
tom5079 a97af59260 Potential fix for memory issues 2019-11-30 15:09:53 +09:00
tom5079 2197de98ea Potential fix for too large bitmap crash 2019-11-25 19:39:17 +09:00
tom5079 c004c7f71a Fixed bug fetching old galleries from hiyobi 2019-11-15 19:47:09 +09:00
tom5079 69fc3ad4e8 typo 2019-11-02 21:50:03 +09:00
tom5079 678a8f0914 Merge pull request #21 from tom5079/development
Fixed bug with missing hash
2019-11-02 21:46:11 +09:00
tom5079 08c4c0bf1f Fixed bug with missing hash
Version 4.1
2019-11-02 21:45:27 +09:00
tom5079 f2a2656837 Merge pull request #20 from tom5079/development
Development
2019-11-02 20:30:04 +09:00
tom5079 2011572270 Merge remote-tracking branch 'origin/development' into development 2019-11-02 20:29:24 +09:00
tom5079 3b682667e1 Fixed bug caused by updated hitomi server structure
Version 4.0
2019-11-02 20:25:03 +09:00
tom5079 6da8de6463 Merge pull request #19 from tom5079/master
merge readme
2019-11-02 20:08:28 +09:00
tom5079 039d415871 Update README.md
r/engrish
2019-08-31 23:59:41 +09:00
tom5079 776f53bde0 Update README.md 2019-08-30 22:28:07 +09:00
tom5079 58e535595e Update README.md 2019-08-30 22:27:32 +09:00
tom5079 96ad5f6a6c Update README.md 2019-08-30 22:27:08 +09:00
tom5079 043f7bedd8 Added quick download/delete 2019-08-30 15:24:51 +09:00
tom5079 69bcd8f7c0 Merge pull request #17 from tom5079/development
Version 3.2
2019-08-29 12:11:22 +09:00
tom5079 8a58564812 Version 3.2 2019-08-29 12:10:51 +09:00
tom5079 d346cf431f Merge conflicts 2019-08-29 11:47:01 +09:00
tom5079 c0bce4f3b1 Merge conflicts 2019-08-29 11:43:20 +09:00
tom5079 94d258ddbb Merge conflicts 2019-08-29 11:42:31 +09:00
tom5079 6bdba49284 added missing file 2019-08-29 11:41:08 +09:00
tom5079 9b99baf4bc Added missing files 2019-08-29 11:39:01 +09:00
tom5079 5ad2a538bc Merge pull request #16 from tom5079/master
merge to development branch
2019-08-29 11:29:27 +09:00
tom5079 28703e9bf2 added missing file 2019-08-29 11:25:08 +09:00
tom5079 e664efefe9 Fixed image broken after download finishes 2019-08-28 09:21:36 +09:00
tom5079 27a8694938 Fixed not moving cached gallery to download folder 2019-08-28 09:01:39 +09:00
tom5079 e0a6102d4d Fixed viewer flickering
Added moving with volume button
Added nomedia
Added help link to error snackbar
2019-08-28 08:56:29 +09:00
tom5079 7106cf04ed Delete google-services.json 2019-08-25 09:52:47 +09:00
tom5079 2afdc5591a Added gallery details
Added dark mode
2019-07-21 20:51:50 +09:00
tom5079 8eed4b67c3 Added gallery details
Added dark mode
2019-07-21 20:51:50 +09:00
tom5079 edacef0f2b Update ignore feature added
Bug fixed
2019-07-14 10:53:42 +09:00
tom5079 d28894f8cd Update ignore feature added
Bug fixed
2019-07-14 10:53:42 +09:00
tom5079 ee8e921e1a Image loading optimized
Adds gallery to history when opened directly by gallery ID
Fixed blurred image
2019-07-11 21:24:25 +09:00
tom5079 480d4b1e9a Image loading optimized
Adds gallery to history when opened directly by gallery ID
Fixed blurred image
2019-07-11 21:24:25 +09:00
tom5079 a79c023220 Fixed invisible favorite tag bug 2019-07-07 17:30:03 +09:00
tom5079 efc50df243 Fixed invisible favorite tag bug 2019-07-07 17:30:03 +09:00
tom5079 905ea766b1 App crash fix 2019-07-07 16:36:42 +09:00
tom5079 bce26f4557 App crash fix 2019-07-07 16:36:42 +09:00
tom5079 474d3ad80a Merge pull request #15 from tom5079/development
Version fix
2019-07-07 15:26:57 +09:00
tom5079 a74b2c9b49 Version fix 2019-07-07 15:26:22 +09:00
tom5079 22bdf61bb3 Version fix 2019-07-07 15:26:22 +09:00
tom5079 69f9b099b7 Merge remote-tracking branch 'origin/development' into development 2019-07-07 15:25:54 +09:00
tom5079 1d812487a6 Merge remote-tracking branch 'origin/development' into development 2019-07-07 15:25:54 +09:00
tom5079 7c2bf8fb9d Version fix 2019-07-07 15:25:36 +09:00
tom5079 dfb78bed69 Version fix 2019-07-07 15:25:36 +09:00
tom5079 fb42b48880 Merge pull request #14 from tom5079/development
Version 3.0
2019-07-07 15:25:02 +09:00
tom5079 bb0988a188 Merge branch 'master' into development 2019-07-07 15:24:53 +09:00
tom5079 c64b6f112b Merge branch 'master' into development 2019-07-07 15:24:53 +09:00
tom5079 9ac7fb490e Merge remote-tracking branch 'origin/development' into development 2019-07-07 15:23:42 +09:00
tom5079 bd88a8a8d3 Merge remote-tracking branch 'origin/development' into development 2019-07-07 15:23:42 +09:00
tom5079 1eb75acb40 UI update
Added sort by popularity functionality
Added auto update
2019-07-07 15:21:56 +09:00
tom5079 5ccc96aeb9 UI update
Added sort by popularity functionality
Added auto update
2019-07-07 15:21:56 +09:00
tom5079 c51eca5012 Create README.md 2019-07-03 20:49:34 +09:00
tom5079 ef72d10344 Create README.md 2019-07-03 20:49:34 +09:00
tom5079 bff911709d Create LICENSE 2019-07-03 20:49:13 +09:00
tom5079 573f0b40d1 Create LICENSE 2019-07-03 20:49:13 +09:00
tom5079 d9c9972a21 Update LICENSE 2019-07-03 20:46:43 +09:00
tom5079 48f49edb19 Update LICENSE 2019-07-03 20:46:43 +09:00
tom5079 ea471afa16 Create LICENSE 2019-07-03 20:45:56 +09:00
tom5079 aa22d9fdd8 Create LICENSE 2019-07-03 20:45:56 +09:00
tom5079 8410a2fdb3 Update LICENSE 2019-07-03 20:44:57 +09:00
tom5079 ec98e4e9a4 Update LICENSE 2019-07-03 20:44:57 +09:00
tom5079 dca6ba457b Added license 2019-07-03 20:44:10 +09:00
tom5079 5b10a781a6 Added license 2019-07-03 20:44:10 +09:00
tom5079 b103188faf Merge pull request #13 from tom5079/master
updated license
2019-07-03 20:07:21 +09:00
tom5079 29637b234c Merge pull request #13 from tom5079/master
updated license
2019-07-03 20:07:21 +09:00
tom5079 aa8132c9e6 Create LICENSE 2019-07-03 19:49:40 +09:00
tom5079 34dc238ef1 Create LICENSE 2019-07-03 19:49:40 +09:00
tom5079 1d21ca2ddf Create README.md 2019-07-03 19:47:13 +09:00
tom5079 3c2675e650 Create README.md 2019-07-03 19:47:13 +09:00
tom5079 7e87bb6838 Search algorithm improved
Language settings in default tag fixed
2019-07-03 19:40:19 +09:00
tom5079 3992a07340 Search algorithm improved
Language settings in default tag fixed
2019-07-03 19:40:19 +09:00
tom5079 bd4b61d7ac Utilizing Glide
Fixed Reader FAB icon
Changed to use gallery id instead of galleryblock to open Reader
2019-06-30 22:04:35 +09:00
tom5079 2046d87031 Utilizing Glide
Fixed Reader FAB icon
Changed to use gallery id instead of galleryblock to open Reader
2019-06-30 22:04:35 +09:00
tom5079 7aab8fa9b9 Merge pull request #12 from tom5079/development
Version 2.11.1
2019-06-23 23:33:23 +09:00
tom5079 0618d8c6f8 Merge pull request #12 from tom5079/development
Version 2.11.1
2019-06-23 23:33:23 +09:00
tom5079 b5812f2a3a Fixed app icon
Version 2.11.1
2019-06-23 23:32:38 +09:00
tom5079 5bfc27835b Fixed app icon
Version 2.11.1
2019-06-23 23:32:38 +09:00
tom5079 ad6c061b6b Fixed bug for older devices
Hoping that the viewer crashing bug is fixed
Version 2.11
2019-06-23 23:09:01 +09:00
tom5079 cdc545ea32 Fixed bug for older devices
Hoping that the viewer crashing bug is fixed
Version 2.11
2019-06-23 23:09:01 +09:00
tom5079 a9df00fc2e Merge pull request #11 from tom5079/development
Pupil v2.10
2019-06-23 16:17:49 +09:00
tom5079 449db97a2b Merge pull request #11 from tom5079/development
Pupil v2.10
2019-06-23 16:17:49 +09:00
tom5079 a990f5d663 Added lock 2019-06-23 10:27:07 +09:00
tom5079 e01380090d Added lock 2019-06-23 10:27:07 +09:00
tom5079 d705cd15b7 Migrate to Android 29
Re-Added Cache clear to prevent deleting downloading images
2019-06-23 00:23:17 +09:00
tom5079 6d1505241e Migrate to Android 29
Re-Added Cache clear to prevent deleting downloading images
2019-06-23 00:23:17 +09:00
tom5079 b90814d23e Memory optimization 2019-06-14 20:01:32 +09:00
tom5079 f303e49e97 Memory optimization 2019-06-14 20:01:32 +09:00
tom5079 7f4b6ed994 Merge pull request #10 from tom5079/development
Version 2.9
2019-06-13 22:08:57 +09:00
tom5079 0e6b50e302 Merge pull request #10 from tom5079/development
Version 2.9
2019-06-13 22:08:57 +09:00
tom5079 45c6f95fcb Changed to non-scrolling horizontal image view 2019-06-13 21:45:31 +09:00
tom5079 868af1e6a2 Changed to non-scrolling horizontal image view 2019-06-13 21:45:31 +09:00
tom5079 f48180665f Bug fix 2019-06-13 21:29:57 +09:00
tom5079 34f7b111ee Bug fix 2019-06-13 21:29:57 +09:00
tom5079 c242aa625a Bug fix 2019-06-13 21:18:26 +09:00
tom5079 df27907c57 Bug fix 2019-06-13 21:18:26 +09:00
tom5079 cdb335111e Added URL support
Added Firebase
Added progressbar to the full screen horizontal reader view
2019-06-13 21:05:52 +09:00
tom5079 75583b9e65 Added URL support
Added Firebase
Added progressbar to the full screen horizontal reader view
2019-06-13 21:05:52 +09:00
tom5079 81728d94e8 Merge pull request #9 from tom5079/development
Pupil v2.8
2019-06-09 15:31:39 +09:00
tom5079 79641fec67 Bug fixed
Added kakaotalk contact
2019-06-09 15:30:01 +09:00
tom5079 91157155b8 Import Optimized 2019-06-09 15:02:40 +09:00
tom5079 257ad92870 Made download simple
Bug fixed
2019-06-09 15:01:52 +09:00
tom5079 3fc71b195a Show gallery ID
Fixed paging problem when tag searched
made gallery info clickable
2019-06-09 13:42:40 +09:00
tom5079 a1f5f10813 Merge pull request #8 from tom5079/development
Version 2.7
2019-06-08 15:33:19 +09:00
tom5079 00a1b3e944 Fixed hiyobi loading bug
Added favorite to reader
2019-06-08 15:29:39 +09:00
tom5079 7ebeb18089 Shows favorited tags first on suggestion list 2019-06-08 14:59:08 +09:00
tom5079 0701efcb5f Added google analytics url 2019-06-08 14:50:19 +09:00
tom5079 31e8c8e453 Bug fixed 2019-06-08 14:44:00 +09:00
tom5079 673c4376b5 Version 2.7 2019-06-08 14:09:54 +09:00
tom5079 ee6592c544 Added Open by gallery ID 2019-06-08 14:05:51 +09:00
tom5079 8ab4ce7c78 Added favorites
Fixed loading bug when not in first page
2019-06-08 13:37:10 +09:00
tom5079 05d11bda0f Search Bug fixed 2019-06-07 21:50:22 +09:00
tom5079 e592b11ee9 Merge pull request #7 from tom5079/development
Version 2.5.3
2019-06-07 21:28:58 +09:00
tom5079 3acb43ace2 fixed hiyobi bug 2019-06-07 20:21:34 +09:00
tom5079 4b157aae5d Merge pull request #6 from tom5079/development
Version 2.5
2019-06-07 12:05:06 +09:00
tom5079 5ca73dbc59 fixed hiyobi support 2019-06-06 10:04:35 +09:00
tom5079 6f187551ee fixed hiyobi support 2019-06-06 10:00:48 +09:00
tom5079 01c1537ae8 deleted hiyobi support 2019-06-06 02:02:20 +09:00
tom5079 57e08d2208 Added download clear feature 2019-06-06 01:06:48 +09:00
tom5079 9014ad6d77 Added auto export feature 2019-06-06 00:57:10 +09:00
tom5079 6f8697791d Added export feature 2019-06-06 00:45:33 +09:00
tom5079 bcd515b2db Download gallery to the data folder not cache folder 2019-06-05 23:03:37 +09:00
tom5079 a0d7417403 Merge pull request #5 from tom5079/development
Pupil v2.2 Release
2019-06-02 01:04:50 +09:00
tom5079 1faf6cb208 Small fix 2019-06-02 01:04:16 +09:00
tom5079 530da98ec6 Bug fix
Add paging
2019-06-01 21:42:14 +09:00
tom5079 f326c69902 Added download list
Added history search
2019-05-19 16:40:28 +09:00
tom5079 a83d7cda0a Merge pull request #4 from tom5079/development
Version 2.0
2019-05-18 23:24:05 +09:00
tom5079 fd83f987dd Bug fixed 2019-05-18 23:20:06 +09:00
tom5079 8de3eace8a Tag search added 2019-05-18 10:51:54 +09:00
tom5079 e787428e6f Download added 2019-05-18 10:37:58 +09:00
tom5079 ba37740c6e Added Bug Tracking System 2019-05-17 11:07:07 +09:00
tom5079 369fa679a6 Several design changes 2019-05-17 10:18:11 +09:00
tom5079 234f9b069a Small fixes 2019-05-16 19:40:44 +09:00
tom5079 d090a59800 Added Offline mode 2019-05-16 18:15:53 +09:00
tom5079 bfa25f3d3c Merge pull request #3 from tom5079/development
Search bug fixed (v1.4 released)
2019-05-16 16:26:58 +09:00
tom5079 23bf93e960 Improved loading speed of the cached gallery 2019-05-16 16:25:28 +09:00
tom5079 5e61912f75 Search bug fixed 2019-05-16 13:08:46 +09:00
tom5079 46702ec3ef Merge pull request #2 from tom5079/development
Pupil v1.3
2019-05-14 19:11:12 +09:00
tom5079 3e088bd646 Added contact 2019-05-14 19:10:09 +09:00
tom5079 726cdf0fae Bug fixed 2019-05-14 18:48:33 +09:00
tom5079 efefa9e174 Added horizontal view for ReaderActivity
Added page selector for ReaderActivity
2019-05-14 13:33:03 +09:00
tom5079 2acfd3c57c Change GalleryActivity to ReaderActivity 2019-05-14 03:58:22 +09:00
tom5079 a7ecaa8ca7 Show transparent status bar 2019-05-14 03:54:41 +09:00
tom5079 941a023677 Merge pull request #1 from tom5079/development
Version 1.2
2019-05-13 21:47:00 +09:00
tom5079 fe523da6ed Security mode toggle added 2019-05-13 21:45:18 +09:00
tom5079 48c190b449 Add Release note to update 2019-05-13 21:29:38 +09:00
tom5079 161d1bdcdd History functionality added 2019-05-13 20:07:42 +09:00
tom5079 720149c38a Add hiyobi image booster translation 2019-05-13 13:03:47 +09:00
tom5079 2bf0f86510 Add hiyobi image booster 2019-05-13 12:56:39 +09:00
tom5079 cbb52f3dc9 Added drawer to the main activity 2019-05-13 01:02:17 +09:00
tom5079 4ba7e269bb Prevent screen from viewed on task manager (cause it's ecchi :}) 2019-05-12 22:55:03 +09:00
tom5079 a71b80b153 Prevent screen from viewed on task manager (cause it's ecchi :}) 2019-05-12 22:49:21 +09:00
tom5079 8e92597dc9 Added ko/ja language support 2019-05-12 20:06:16 +09:00
tom5079 abd2f3ae17 Added update feature 2019-05-12 19:15:53 +09:00
tom5079 06c7d77497 gitignore update 2019-05-11 23:18:55 +09:00
tom5079 2a7814798b Initial commit 2019-05-11 22:59:12 +09:00
117 changed files with 7638 additions and 36576 deletions
+33 -1
View File
@@ -1 +1,33 @@
.vscode/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Log/OS Files
*.log
# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.apk
output.json
# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml
# Keystore files
*.jks
*.keystore
# Google Services (e.g. APIs or Firebase)
google-services.json
# Android Profiling
*.hprof
+4
View File
@@ -0,0 +1,4 @@
License is specified in following module separately
app/
libpupil/
-3
View File
@@ -1,3 +0,0 @@
[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) except for `zh.json`
`zh.json`: [CC BY-NC-SA 3.0](https://github.com/EhTagTranslation/Database/blob/master/LICENSE.md) / Based on [EhTagTranslation/Database](https://github.com/EhTagTranslation/Database)
+17 -39
View File
@@ -1,48 +1,26 @@
# Tag translation
![Banner](https://github.com/tom5079/Pupil/blob/gh-pages/assets/images/pupil-banner.png?raw=true)
*Pupil, Hitomi.la viewer for Android*
Tags will be updated every day at 00:00 UTC
![](https://img.shields.io/github/downloads/tom5079/Pupil/total)
[![](https://img.shields.io/github/downloads/tom5079/Pupil/5.3.8-hotfix1/Pupil-v5.3.8-hotfix1.apk?color=%234fc3f7&label=DOWNLOAD%20APP&style=for-the-badge)](https://github.com/tom5079/Pupil/releases/download/5.3.8-hotfix1/Pupil-v5.3.8-hotfix1.apk)
[![](https://discordapp.com/api/guilds/610452916612104194/embed.png?style=banner2)](https://discord.gg/Stj4b5v)
## License
Check [LICENSE](https://github.com/tom5079/Pupil/blob/tags/LICENSE.md)
# Features
![Main Screen](https://github.com/tom5079/Pupil/blob/gh-pages/assets/images/main-screenshot.jpg?raw=true)
## Participating in tag translation
# Installation
[한글 설명서](https://github.com/tom5079/Pupil/blob/tags/docs/README-ko.md)
Go [Releases page](https://github.com/tom5079/Pupil/releases) and get latest version or
Visit [github page](https://tom5079.github.io/Pupil/) (only available in Korean)
or Build app yourself
### Rules
* Each translation file should be located in the root folder
* Each translation file should be named in following format: [`<ISO 639-1 Code>.json`](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
* Each translation file should be formatted as JSON file
# Manual
### 1. Access Editor
[Manual](https://tom5079.github.io/Pupil/2019/06/06/manual-kr.html) is only available in Korean. Consider using translator.
### 1-1. (Optional) Add language file
# Contribution
If the target language file doesn't exist, you have to create one.
Any kind of contribution is appreciated. Feel free to leave PR!
1) Click `Create New File` Button at the upper right corner
![](https://github.com/tom5079/Pupil/blob/tags/docs/images/add-file.PNG?raw=true)
2) Name the file according to the naming rule
![](https://github.com/tom5079/Pupil/blob/tags/docs/images/filename.png?raw=true)
3) Copy-paste all the content of [`template.json`](https://raw.githubusercontent.com/tom5079/Pupil/tags/template.json)
### 1-2. Edit Existing File
Click the file to edit and click Pen icon located at the upper right corner
![](https://github.com/tom5079/Pupil/blob/tags/docs/images/edit-file.png?raw=true)
### 2. Make Necessary Changes
Use text editor shown on screen to make changes
### 3. Propose Changes
When you're done with your changes, Scroll down to the bottom of the page and click `Propose Changes`
You don't have to provide any commit messages
![](https://github.com/tom5079/Pupil/blob/tags/docs/images/propose-changes.png?raw=true)
The changes will be applied after review
## Tag Translation
Head over to [tags branch](https://github.com/tom5079/Pupil/tree/tags)
+1
View File
@@ -0,0 +1 @@
/build
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
+1
View File
@@ -0,0 +1 @@
+95
View File
@@ -0,0 +1,95 @@
plugins {
alias(libs.plugins.org.jetbrains.kotlin.android)
alias(libs.plugins.android.application)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.googleServices)
alias(libs.plugins.ksp)
alias(libs.plugins.hilt)
alias(libs.plugins.kotlinx.serialization)
alias(libs.plugins.crashlytics)
}
android {
namespace = "xyz.quaver.pupil"
defaultConfig {
applicationId = "xyz.quaver.pupil"
minSdk = libs.versions.android.minSdk.get().toInt()
compileSdk = libs.versions.android.compileSdk.get().toInt()
targetSdk = libs.versions.android.targetSdk.get().toInt()
versionCode = 69
versionName = "6.0.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
getByName("debug") {
isMinifyEnabled = false
isShrinkResources = false
isDebuggable = true
applicationIdSuffix = ".debug"
versionNameSuffix = "-DEBUG"
ext.set("enableCrashlytics", false)
ext.set("alwaysUpdateBuildId", false)
}
getByName("release") {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
buildFeatures {
compose = true
}
compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
}
dependencies {
coreLibraryDesugaring(libs.android.desugaring)
implementation(libs.kotlinx.serialization)
implementation(libs.kotlinx.coroutines)
implementation(libs.kotlinx.datetime)
implementation(libs.androidx.core)
implementation(libs.androidx.activity)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.androidx.navigation.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.material3.windowSizeClass)
implementation(libs.androidx.compose.foundation)
debugImplementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.compose.material.icons.extended)
implementation(libs.androidx.room.runtime)
ksp(libs.androidx.room.compiler)
implementation(libs.accompanist.adaptive)
implementation(libs.coil)
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.analytics)
implementation(libs.firebase.crashlytics)
implementation(libs.firebase.perf)
implementation(libs.hilt.android)
ksp(libs.hilt.compiler)
implementation(libs.ktor.client)
implementation(libs.ktor.client.okhttp)
implementation(libs.documentFileX)
}
Binary file not shown.
Binary file not shown.
+35
View File
@@ -0,0 +1,35 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontobfuscate
-keepattributes *Annotation*, InnerClasses
-dontnote kotlinx.serialization.SerializationKt
-keep,includedescriptorclasses class xyz.quaver.**$$serializer { *; } # <-- change package name to your app's
-keepclassmembers class xyz.quaver.pupil.** { # <-- change package name to your app's
*** Companion;
}
-keepclasseswithmembers class xyz.quaver.pupil.** { # <-- change package name to your app's
kotlinx.serialization.KSerializer serializer(...);
}
-keep class xyz.quaver.pupil.** { *; }
-dontwarn org.slf4j.impl.StaticLoggerBinder
+20
View File
@@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "xyz.quaver.pupil",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 69,
"versionName": "6.0.0",
"outputFile": "app-release.apk"
}
],
"elementType": "File"
}
@@ -0,0 +1,183 @@
/*
* Pupil, Hitomi.la viewer for Android
* Copyright (C) 2019 tom5079
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@file:Suppress("UNUSED_VARIABLE")
package xyz.quaver.pupil
import android.util.Log
import androidx.test.ext.junit.runners.AndroidJUnit4
import kotlinx.coroutines.runBlocking
import okhttp3.OkHttpClient
import okhttp3.Request
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import xyz.quaver.pupil.hitomi.*
import java.util.*
import java.util.concurrent.TimeUnit
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
// @Before
// fun init() {
// val appContext = InstrumentationRegistry.getInstrumentation().targetContext
// }
@Before
fun init() {
clientBuilder = OkHttpClient.Builder()
.readTimeout(0, TimeUnit.SECONDS)
.writeTimeout(0, TimeUnit.SECONDS)
.callTimeout(0, TimeUnit.SECONDS)
.connectTimeout(0, TimeUnit.SECONDS)
.addInterceptor { chain ->
val request = chain.request().newBuilder()
.header("Referer", "https://hitomi.la/")
.build()
chain.proceed(request)
}
}
@Test
fun test_empty() {
print(
"".trim()
.replace(Regex("""^\?"""), "")
.lowercase(Locale.getDefault())
.split(Regex("\\s+"))
.map {
it.replace('_', ' ')
})
}
@Test
fun test_nozomi() {
val nozomi = getGalleryIDsFromNozomi(null, "index", "all")
Log.d("PUPILD", nozomi.size.toString())
}
@Test
fun test_search() {
val ids = getGalleryIDsForQuery("language:korean").reversed()
print(ids.size)
}
@Test
fun test_suggestions() {
val suggestions = getSuggestionsForQuery("language:g")
print(suggestions)
}
@Test
fun test_doSearch() {
val r = runBlocking {
doSearch("language:korean")
}
Log.d("PUPILD", r.take(10).toString())
}
// @Test
// fun test_getBlock() {
// val galleryBlock = getGalleryBlock(2097576)
//
// print(galleryBlock)
// }
//
// @Test
// fun test_getGallery() {
// val gallery = getGallery(2097751)
//
// print(gallery)
// }
@Test
fun test_getGalleryInfo() {
val info = getGalleryInfo(1469394)
print(info)
}
@Test
fun test_getReader() {
val reader = getGalleryInfo(2128654)
Log.d("PUPILD", reader.toString())
}
@Test
fun test_getImages() { runBlocking {
val galleryID = 2128654
val images = getGalleryInfo(galleryID).files.map {
imageUrlFromImage(galleryID, it,false)
}
Log.d("PUPILD", images.toString())
// images.forEachIndexed { index, image ->
// println("Testing $index/${images.size}: $image")
// val response = client.newCall(
// Request.Builder()
// .url(image)
// .header("Referer", "https://hitomi.la/")
// .build()
// ).execute()
//
// assertEquals(200, response.code())
//
// println("$index/${images.size} Passed")
// }
} }
// @Test
// fun test_urlFromUrlFromHash() {
// val url = urlFromUrlFromHash(1531795, GalleryFiles(
// 212, "719d46a7556be0d0021c5105878507129b5b3308b02cf67f18901b69dbb3b5ef", 1, "00.jpg", 300
// ), "webp")
//
// print(url)
// }
// @Test
// suspend fun test_doSearch_extreme() {
// val query = "language:korean -tag:sample -female:humiliation -female:diaper -female:strap-on -female:squirting -female:lizard_girl -female:voyeurism -type:artistcg -female:blood -female:ryona -male:blood -male:ryona -female:crotch_tattoo -male:urethra_insertion -female:living_clothes -male:tentacles -female:slave -female:gag -male:gag -female:wooden_horse -male:exhibitionism -male:miniguy -female:mind_break -male:mind_break -male:unbirth -tag:scanmark -tag:no_penetration -tag:nudity_only -female:enema -female:brain_fuck -female:navel_fuck -tag:novel -tag:mosaic_censorship -tag:webtoon -male:rape -female:rape -female:yuri -male:anal -female:anal -female:futanari -female:huge_breasts -female:big_areolae -male:torture -male:stuck_in_wall -female:stuck_in_wall -female:torture -female:birth -female:pregnant -female:drugs -female:bdsm -female:body_writing -female:cbt -male:dark_skin -male:insect -female:insect -male:vore -female:vore -female:vomit -female:urination -female:urethra_insertion -tag:mmf_threesome -female:sex_toys -female:double_penetration -female:eggs -female:prolapse -male:smell -male:bestiality -female:bestiality -female:big_ass -female:milf -female:mother -male:dilf -male:netorare -female:netorare -female:cosplaying -female:filming -female:armpit_sex -female:armpit_licking -female:tickling -female:lactation -male:skinsuit -female:skinsuit -male:bbm -female:prostitution -female:double_penetration -female:females_only -male:males_only -female:tentacles -female:tentacles -female:stomach_deformation -female:hairy_armpits -female:large_insertions -female:mind_control -male:orc -female:dark_skin -male:yandere -female:yandere -female:scat -female:toddlercon -female:bbw -female:hairy -male:cuntboy -male:lactation -male:drugs -female:body_modification -female:monoeye -female:chikan -female:long_tongue -female:harness -female:fisting -female:glory_hole -female:latex -male:latex -female:unbirth -female:giantess -female:sole_dickgirl -female:robot -female:doll_joints -female:machine -tag:artbook -male:cbt -female:farting -male:farting -male:midget -female:midget -female:exhibitionism -male:monster -female:big_nipples -female:big_clit -female:gyaru -female:piercing -female:necrophilia -female:snuff -female:smell -male:cheating -female:cheating -male:snuff -female:harem -male:harem"
// print(doSearch(query).size)
// }
// @Test
// suspend fun test_parse() {
// print(doSearch("-male:yaoi -female:yaoi -female:loli").size)
// }
// @Test
// fun test_subdomainFromUrl() {
// val galleryInfo = getGalleryInfo(1929109).files[2]
// print(urlFromUrlFromHash(1929109, galleryInfo, "webp", null, "a"))
// }
}
+22
View File
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Pupil, Hitomi.la viewer for Android
~ Copyright (C) 2020 tom5079
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name" translatable="false" tools:override="true">Pupil-Debug</string>
</resources>
+65
View File
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="23"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="23"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.RUN_USER_INITIATED_JOBS" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<application
android:name=".Pupil"
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:networkSecurityConfig="@xml/network_security_config"
tools:ignore="UnusedAttribute" >
<meta-data
android:name="com.google.mlkit.vision.DEPENDENCIES"
android:value="face" />
<provider
android:authorities="${applicationId}.provider"
android:name="androidx.core.content.FileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
<service android:name=".services.ImageCacheService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="false" />
<activity
android:name=".ui.MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Material.Light.NoActionBar"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

@@ -0,0 +1,74 @@
/*
* Pupil, Hitomi.la viewer for Android
* Copyright (C) 2019 tom5079
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package xyz.quaver.pupil
import android.app.Application
import android.app.Notification
import android.app.NotificationChannel
import android.app.NotificationManager
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Build
import com.google.firebase.FirebaseApp
import com.google.firebase.crashlytics.FirebaseCrashlytics
import dagger.hilt.android.HiltAndroidApp
import xyz.quaver.io.FileX
import java.util.UUID
@HiltAndroidApp
class Pupil : Application() {
override fun onCreate() {
FirebaseApp.initializeApp(this)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val manager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
manager.createNotificationChannel(NotificationChannel("download", getString(R.string.channel_download), NotificationManager.IMPORTANCE_LOW).apply {
description = getString(R.string.channel_download_description)
enableLights(false)
enableVibration(false)
lockscreenVisibility = Notification.VISIBILITY_SECRET
})
manager.createNotificationChannel(NotificationChannel("downloader", getString(R.string.channel_downloader), NotificationManager.IMPORTANCE_LOW).apply {
description = getString(R.string.channel_downloader_description)
enableLights(false)
enableVibration(false)
lockscreenVisibility = Notification.VISIBILITY_SECRET
})
manager.createNotificationChannel(NotificationChannel("update", getString(R.string.channel_update), NotificationManager.IMPORTANCE_HIGH).apply {
description = getString(R.string.channel_update_description)
enableLights(true)
enableVibration(true)
lockscreenVisibility = Notification.VISIBILITY_SECRET
})
manager.createNotificationChannel(NotificationChannel("import", getString(R.string.channel_update), NotificationManager.IMPORTANCE_LOW).apply {
description = getString(R.string.channel_update_description)
enableLights(false)
enableVibration(false)
lockscreenVisibility = Notification.VISIBILITY_SECRET
})
}
super.onCreate()
}
}
@@ -0,0 +1,24 @@
package xyz.quaver.pupil.di
import android.content.Context
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import xyz.quaver.pupil.networking.FileImageCache
import xyz.quaver.pupil.networking.ImageCache
import java.io.File
import javax.inject.Singleton
@Module
@InstallIn(SingletonComponent::class)
object SingletonModule {
@Singleton
@Provides
fun provideImageCache(
@ApplicationContext context: Context
): ImageCache {
return FileImageCache(File(context.cacheDir, "image_cache"))
}
}
@@ -0,0 +1,110 @@
package xyz.quaver.pupil.networking
import android.os.BaseBundle
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
interface TagLike {
fun toTag(): SearchQuery.Tag
}
@Serializable
data class Artist(val artist: String): TagLike {
override fun toTag() = SearchQuery.Tag("artist", artist)
}
@Serializable
data class Group(val group: String): TagLike {
override fun toTag() = SearchQuery.Tag("group", group)
}
@Serializable
data class Series(@SerialName("parody") val series: String): TagLike {
override fun toTag() = SearchQuery.Tag("series", series)
}
@Serializable
data class Character(val character: String): TagLike {
override fun toTag() = SearchQuery.Tag("character", character)
}
@Serializable
data class GalleryTag(
val tag: String,
val female: String? = null,
val male: String? = null
): TagLike {
override fun toTag() = SearchQuery.Tag(
if (female.isNullOrEmpty() && male.isNullOrEmpty()) {
"tag"
} else if (male.isNullOrEmpty()) {
"female"
} else {
"male"
},
tag
)
}
@Serializable
data class Language(
@SerialName("galleryid") val galleryID: String,
val name: String
)
@Serializable
data class GalleryFile(
@SerialName("haswebp") val hasWebP: Int = 0,
@SerialName("hasavif") val hasAVIF: Int = 0,
@SerialName("hasjxl") val hasJXL: Int = 0,
val height: Int,
val width: Int,
val hash: String,
val name: String,
) {
fun writeToBundle(bundle: BaseBundle) {
bundle.putInt("hasWebP", hasWebP)
bundle.putInt("hasAVIF", hasAVIF)
bundle.putInt("hasJXL", hasJXL)
bundle.putInt("height", height)
bundle.putInt("width", width)
bundle.putString("hash", hash)
bundle.putString("name", name)
}
companion object {
fun fromBundle(bundle: BaseBundle) = GalleryFile(
bundle.getInt("hasWebP"),
bundle.getInt("hasAVIF"),
bundle.getInt("hasJXL"),
bundle.getInt("height"),
bundle.getInt("width"),
bundle.getString("hash")!!,
bundle.getString("name")!!
)
}
}
@Serializable
data class GalleryInfo(
val id: String,
val title: String,
@SerialName("japanese_title") val japaneseTitle: String? = null,
val language: String? = null,
val type: String,
val date: String,
val artists: List<Artist>? = null,
val groups: List<Group>? = null,
@SerialName("parodys") val series: List<Series>? = null,
val tags: List<GalleryTag>? = null,
val related: List<Int> = emptyList(),
val languages: List<Language> = emptyList(),
val characters: List<Character>? = null,
@SerialName("scene_indexes") val sceneIndices: List<Int>? = emptyList(),
val files: List<GalleryFile> = emptyList()
)
@JvmName("joinToCapitalizedStringArtist")
fun List<Artist>.joinToCapitalizedString() = joinToString { it.artist.replaceFirstChar(Char::titlecase) }
@JvmName("joinToCapitalizedStringGroup")
fun List<Group>.joinToCapitalizedString() = joinToString { it.group.replaceFirstChar(Char::titlecase) }
@@ -0,0 +1,36 @@
package xyz.quaver.pupil.networking
import kotlinx.coroutines.Job
import kotlinx.coroutines.async
import kotlinx.coroutines.coroutineScope
class GallerySearchSource(val query: SearchQuery?) {
private var searchResult: List<Int>? = null
private var job: Job? = null
suspend fun load(range: IntRange): Result<Pair<List<GalleryInfo>, Int>> = runCatching {
val searchResult = searchResult ?: (
HitomiHttpClient
.search(query)
.getOrThrow()
.toList()
.also { searchResult = it }
)
val galleryResults = coroutineScope {
searchResult.slice(range).map { galleryID ->
async {
HitomiHttpClient.getGalleryInfo(galleryID)
}
}
}
val galleries = galleryResults.map { result ->
result.await().getOrThrow()
}
Pair(galleries, searchResult.size)
}
fun cancel() = job?.cancel()
}
@@ -0,0 +1,402 @@
package xyz.quaver.pupil.networking
import io.ktor.client.HttpClient
import io.ktor.client.call.body
import io.ktor.client.engine.okhttp.OkHttp
import io.ktor.client.plugins.onDownload
import io.ktor.client.request.get
import io.ktor.client.request.header
import io.ktor.client.statement.HttpResponse
import io.ktor.client.statement.bodyAsText
import io.ktor.utils.io.ByteReadChannel
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import kotlinx.coroutines.withContext
import kotlinx.datetime.Clock.System.now
import kotlinx.datetime.Instant
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.contentOrNull
import kotlinx.serialization.json.jsonArray
import kotlinx.serialization.json.jsonPrimitive
import java.nio.ByteBuffer
import java.nio.IntBuffer
import kotlin.time.Duration
import kotlin.time.Duration.Companion.minutes
const val domain = "ltn.hitomi.la"
const val nozomiExtension = ".nozomi"
const val compressedNozomiPrefix = "n"
const val B = 16
const val indexDir = "tagindex"
const val maxNodeSize = 464
const val galleriesIndexDir = "galleriesindex"
const val tagIndexDomain = "tagindex.hitomi.la"
const val separator = "-"
const val extension = ".html"
data class Suggestion(
val tag: SearchQuery.Tag,
val count: Int,
)
fun IntBuffer.toSet(): Set<Int> {
val result = LinkedHashSet<Int>()
while (this.hasRemaining()) {
result.add(this.get())
}
return result
}
private val json = Json {
isLenient = true
ignoreUnknownKeys = true
}
class ImagePathResolver(ggjs: String) {
private val defaultPrefix: Int = Regex("var o = (\\d)").find(ggjs)!!.groupValues[1].toInt()
private val prefixMap: Map<Int, Int> = buildMap {
val o = Regex("o = (\\d); break;").find(ggjs)!!.groupValues[1].toInt()
Regex("case (\\d+):").findAll(ggjs).forEach {
val case = it.groupValues[1].toInt()
put(case, o)
}
}
private val imageBaseDir: String = Regex("b: '(.+)'").find(ggjs)!!.groupValues[1]
fun decodeSubdomain(hash: String, thumbnail: Boolean): String {
val key = (hash.last() + hash.dropLast(1).takeLast(2)).toInt(16)
val base = if (thumbnail) "tn" else "a"
return "${'a' + (prefixMap[key] ?: defaultPrefix)}$base"
}
fun decodeImagePath(hash: String, thumbnail: Boolean): String {
val key = hash.last() to hash.dropLast(1).takeLast(2)
return if (thumbnail) {
"${key.first}/${key.second}/$hash"
} else {
"$imageBaseDir/${(key.first + key.second).toInt(16)}/$hash"
}
}
}
class ExpirableEntry<T>(
private val expiryDuration: Duration,
private val action: suspend () -> T,
) {
private var value: T? = null
private var expiresAt: Instant = now()
private val mutex = Mutex()
suspend fun getValue(): T = mutex.withLock {
value?.let { if (expiresAt > now()) value else null } ?: action().also {
expiresAt = now() + expiryDuration
value = it
}
}
}
object HitomiHttpClient {
private val httpClient = HttpClient(OkHttp) {
engine {
config {
sslSocketFactory(SSLSettings.sslContext!!.socketFactory, SSLSettings.trustManager!!)
}
}
}
private var imagePathResolver = ExpirableEntry(1.minutes) {
ImagePathResolver(httpClient.get("https://ltn.hitomi.la/gg.js").bodyAsText())
}
private val tagIndexVersion = ExpirableEntry(1.minutes) { getIndexVersion("tagindex") }
private val galleriesIndexVersion =
ExpirableEntry(1.minutes) { getIndexVersion("galleriesindex") }
private suspend fun getIndexVersion(name: String): String = withContext(Dispatchers.IO) {
httpClient.get("https://$domain/$name/version?_=${System.currentTimeMillis()}").bodyAsText()
}
private suspend fun getURLAtRange(url: String, range: LongRange): ByteBuffer {
val response: HttpResponse = withContext(Dispatchers.IO) {
httpClient.get(url) {
header("Range", "bytes=${range.first}-${range.last}")
}
}
val result: ByteArray = response.body()
return ByteBuffer.wrap(result)
}
private suspend fun getNodeAtAddress(field: String, address: Long): Node {
val url = when (field) {
"galleries" -> "https://$domain/$galleriesIndexDir/galleries.${galleriesIndexVersion.getValue()}.index"
"languages" -> "https://$domain/$galleriesIndexDir/languages.${galleriesIndexVersion.getValue()}.index"
"nozomiurl" -> "https://$domain/$galleriesIndexDir/nozomiurl.${galleriesIndexVersion.getValue()}.index"
else -> "https://$domain/$indexDir/$field.${tagIndexVersion.getValue()}.index"
}
return Node.decodeNode(
getURLAtRange(url, address..<address + maxNodeSize)
)
}
private suspend fun bSearch(
field: String,
key: Node.Key,
node: Node,
): Node.Data? {
if (node.keys.isEmpty()) {
return null
}
val (matched, index) = node.locateKey(key)
if (matched) {
return node.datas[index]
} else if (node.isLeaf) {
return null
}
val nextNode = getNodeAtAddress(field, node.subNodeAddresses[index])
return bSearch(field, key, nextNode)
}
private suspend fun getGalleryIDsFromData(offset: Long, length: Int): IntBuffer {
val url =
"https://$domain/$galleriesIndexDir/galleries.${galleriesIndexVersion.getValue()}.data"
if (length > 100000000 || length <= 0) {
error("length $length is too long")
}
return getURLAtRange(url, offset until (offset + length)).asIntBuffer()
}
private fun encodeSearchQueryForUrl(s: Char) =
when (s) {
' ' -> "_"
'/' -> "slash"
'.' -> "dot"
else -> s.toString()
}
private fun sanitize(s: String) = s.replace(Regex("[/#]"), "")
private suspend fun getGalleryIDsFromNozomi(
area: String?,
tag: String,
language: String,
): IntBuffer {
val nozomiAddress = if (area == null) {
"https://$domain/$compressedNozomiPrefix/$tag-$language$nozomiExtension"
} else {
"https://$domain/$compressedNozomiPrefix/$area/$tag-$language$nozomiExtension"
}
val response: HttpResponse = withContext(Dispatchers.IO) {
httpClient.get(nozomiAddress)
}
val result: ByteArray = response.body()
return ByteBuffer.wrap(result).asIntBuffer()
}
private suspend fun getGalleryIDsForQuery(
query: SearchQuery.Tag,
language: String = "all",
): IntBuffer = when (query.namespace) {
"female", "male" -> getGalleryIDsFromNozomi("tag", query.toString(), language)
"language" -> getGalleryIDsFromNozomi(null, "index", query.tag)
null -> {
val key = Node.Key(query.tag)
val node = getNodeAtAddress("galleries", 0)
val data = bSearch("galleries", key, node)
if (data != null) getGalleryIDsFromData(
data.offset,
data.length
) else IntBuffer.allocate(0)
}
else -> getGalleryIDsFromNozomi(query.namespace, query.tag, language)
}
suspend fun getSuggestionsForQuery(query: SearchQuery.Tag): Result<List<Suggestion>> =
runCatching {
val field = query.namespace ?: "global"
val chars = query.tag.map(::encodeSearchQueryForUrl)
val suggestions = json.parseToJsonElement(
withContext(Dispatchers.IO) {
httpClient.get(
"https://$tagIndexDomain/$field${
if (chars.isNotEmpty()) "/${
chars.joinToString(
"/"
)
}" else ""
}.json"
).bodyAsText()
}
)
buildList {
suggestions.jsonArray.forEach { suggestionRaw ->
val suggestion = suggestionRaw.jsonArray
if (suggestion.size < 3) {
return@forEach
}
val namespace = suggestion[2].jsonPrimitive.contentOrNull ?: ""
val tag =
sanitize(suggestion[0].jsonPrimitive.contentOrNull ?: return@forEach)
add(
Suggestion(
SearchQuery.Tag(
namespace,
tag
),
suggestion[1].jsonPrimitive.contentOrNull?.toIntOrNull() ?: 0,
)
)
}
}
}
suspend fun getGalleryInfo(galleryID: Int) = runCatching {
withContext(Dispatchers.IO) {
json.decodeFromString<GalleryInfo>(
httpClient.get("https://$domain/galleries/$galleryID.js").bodyAsText()
.replace("var galleryinfo = ", "")
)
}
}
suspend fun search(query: SearchQuery?): Result<Set<Int>> = runCatching {
when (query) {
is SearchQuery.Tag -> getGalleryIDsForQuery(query).toSet()
is SearchQuery.Not -> coroutineScope {
val allGalleries = async {
getGalleryIDsFromNozomi(null, "index", "all")
}
val queriedGalleries = search(query.query).getOrThrow()
val result = LinkedHashSet<Int>()
with(allGalleries.await()) {
while (this.hasRemaining()) {
val gallery = this.get()
if (gallery in queriedGalleries) {
result.add(gallery)
}
}
}
result
}
is SearchQuery.And -> coroutineScope {
val queries = query.queries.map { query ->
async {
search(query).getOrThrow()
}
}
val result = queries.first().await().toMutableSet()
queries.drop(1).forEach {
val queryResult = it.await()
result.retainAll(queryResult)
}
result
}
is SearchQuery.Or -> coroutineScope {
val queries = query.queries.map { query ->
async {
search(query).getOrThrow()
}
}
val result = LinkedHashSet<Int>()
queries.forEach {
val queryResult = it.await()
result.addAll(queryResult)
}
result
}
null -> getGalleryIDsFromNozomi(null, "index", "all").toSet()
}
}
suspend fun getImageURL(galleryFile: GalleryFile, thumbnail: Boolean = false): List<String> =
buildList {
val imagePathResolver = imagePathResolver.getValue()
listOf("webp", "avif", "jxl").forEach { type ->
val available = when {
thumbnail && type != "jxl" -> true
type == "webp" -> galleryFile.hasWebP != 0
type == "avif" -> galleryFile.hasAVIF != 0
!thumbnail && type == "jxl" -> galleryFile.hasJXL != 0
else -> false
}
if (!available) return@forEach
val url = buildString {
append("https://")
append(imagePathResolver.decodeSubdomain(galleryFile.hash, thumbnail))
append(".hitomi.la/")
append(type)
if (thumbnail) append("bigtn")
append('/')
append(imagePathResolver.decodeImagePath(galleryFile.hash, thumbnail))
append('.')
append(type)
}
add(url)
}
}
suspend fun loadImage(
galleryFile: GalleryFile,
thumbnail: Boolean = false,
acceptImage: (String) -> Boolean = { true },
onDownload: (bytesSentTotal: Long, contentLength: Long?) -> Unit = { _, _ -> },
): Result<Pair<ByteReadChannel, String>> {
return runCatching {
withContext(Dispatchers.IO) {
val url = getImageURL(galleryFile, thumbnail).firstOrNull(acceptImage)
?: error("No available image")
val channel: ByteReadChannel = httpClient.get(url) { onDownload(onDownload) }.body()
Pair(channel, url)
}
}
}
}
@@ -0,0 +1,135 @@
package xyz.quaver.pupil.networking
import com.google.firebase.crashlytics.FirebaseCrashlytics
import io.ktor.util.cio.writeChannel
import io.ktor.utils.io.copyAndClose
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.cancelAndJoin
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import kotlinx.coroutines.withContext
import java.io.File
sealed class ImageLoadProgress {
data object NotStarted : ImageLoadProgress()
data class Progress(val bytesSent: Long, val contentLength: Long?) : ImageLoadProgress()
data class Finished(val file: File) : ImageLoadProgress()
data class Error(val exception: Throwable) : ImageLoadProgress()
}
interface ImageCache {
suspend fun load(
galleryFile: GalleryFile,
forceDownload: Boolean = false,
): StateFlow<ImageLoadProgress>
suspend fun free(vararg files: GalleryFile)
suspend fun clear()
}
class FileImageCache(
private val cacheDir: File,
private val cacheLimit: Long = 128 * 1024 * 1024, // 128MB
) : ImageCache {
private val mutex = Mutex()
private val requests = mutableMapOf<String, Pair<Job, StateFlow<ImageLoadProgress>>>()
private val activeFiles = mutableMapOf<String, File>()
private suspend fun cleanup() = withContext(Dispatchers.IO) {
mutex.withLock {
val size = cacheDir.listFiles()?.sumOf { it.length() } ?: 0
if (size > cacheLimit) {
cacheDir.listFiles { file ->
file.nameWithoutExtension !in activeFiles
}?.forEach { file ->
file.delete()
}
}
}
}
override suspend fun free(vararg files: GalleryFile) = withContext(Dispatchers.IO) {
mutex.withLock {
files.forEach { file ->
val hash = file.hash
requests[hash]?.let { (job, _) ->
job.cancel()
}
requests.remove(hash)
activeFiles.remove(hash)
}
}
}
override suspend fun clear(): Unit = withContext(Dispatchers.IO) {
mutex.withLock {
requests.forEach { _, (job, _) -> job.cancel() }
activeFiles.clear()
cacheDir.deleteRecursively()
}
}
override suspend fun load(
galleryFile: GalleryFile,
forceDownload: Boolean,
): StateFlow<ImageLoadProgress> {
val hash = galleryFile.hash
mutex.withLock {
val file = activeFiles[hash]
if (!forceDownload && file != null) {
return MutableStateFlow(ImageLoadProgress.Finished(file))
}
}
cleanup()
mutex.withLock {
requests[hash]?.first?.cancelAndJoin()
activeFiles[hash]?.delete()
val flow = MutableStateFlow<ImageLoadProgress>(ImageLoadProgress.NotStarted)
val job = coroutineScope {
launch {
runCatching {
val (channel, url) = HitomiHttpClient.loadImage(galleryFile) { sent, total ->
flow.value = ImageLoadProgress.Progress(sent, total)
}.onFailure {
FirebaseCrashlytics.getInstance().recordException(it)
flow.value = ImageLoadProgress.Error(it)
}.getOrThrow()
val file = File(cacheDir, "$hash.${url.substringAfterLast('.')}")
mutex.withLock {
activeFiles.put(hash, file)
}
channel.copyAndClose(file.writeChannel())
file
}.onSuccess { file ->
flow.value = ImageLoadProgress.Finished(file)
}.onFailure {
activeFiles.remove(hash)
FirebaseCrashlytics.getInstance().recordException(it)
flow.value = ImageLoadProgress.Error(it)
}
}
}
requests[hash] = job to flow
return flow
}
}
}
@@ -0,0 +1,107 @@
@file:OptIn(ExperimentalUnsignedTypes::class)
package xyz.quaver.pupil.networking
import java.nio.ByteBuffer
import java.security.MessageDigest
import kotlin.math.min
private fun sha256(data: ByteArray): ByteArray =
MessageDigest.getInstance("SHA-256").digest(data)
private fun hashTerm(term: String): UByteArray =
sha256(term.toByteArray()).sliceArray(0..<4).toUByteArray()
data class Node(
val keys: List<Key>,
val datas: List<Data>,
val subNodeAddresses: List<Long>
) {
data class Key(
private val key: UByteArray
): Comparable<Key> {
constructor(term: String): this(hashTerm(term))
override fun compareTo(other: Key): Int {
val minSize = min(this.key.size, other.key.size)
for (i in 0..<minSize) {
if (this.key[i] < other.key[i]) {
return -1
} else if(this.key[i] > other.key[i]) {
return 1
}
}
return 0
}
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as Key
return key.contentEquals(other.key)
}
override fun hashCode(): Int {
return key.contentHashCode()
}
}
data class Data(
val offset: Long,
val length: Int
)
companion object {
fun decodeNode(buffer: ByteBuffer): Node {
val numberOfKeys = buffer.int
val keys = mutableListOf<Node.Key>()
for (i in 0..<numberOfKeys) {
val keySize = buffer.int
val key = ByteArray(keySize)
buffer.get(key)
keys.add(Node.Key(key.toUByteArray()))
}
val numberOfDatas = buffer.int
val datas = mutableListOf<Data>()
for (i in 0..<numberOfDatas) {
val offset = buffer.long
val length = buffer.int
datas.add(Data(offset, length))
}
val numberOfSubNodeAddresses = B+1
val subNodeAddresses = mutableListOf<Long>()
for (i in 0..<numberOfSubNodeAddresses) {
val subNodeAddress = buffer.long
subNodeAddresses.add(subNodeAddress)
}
return Node(keys, datas, subNodeAddresses)
}
}
val isLeaf: Boolean = subNodeAddresses.all { it == 0L }
fun locateKey(target: Key): Pair<Boolean, Int> {
val index = keys.indexOfFirst { key -> target <= key }
if (index == -1) {
return Pair(false, keys.size)
}
return Pair(keys[index] == target, index)
}
}
@@ -0,0 +1,80 @@
package xyz.quaver.pupil.networking
import android.content.res.Resources
import java.io.ByteArrayInputStream
import java.security.KeyStore
import java.security.SecureRandom
import java.security.cert.CertificateFactory
import javax.net.ssl.SSLContext
import javax.net.ssl.TrustManagerFactory
import javax.net.ssl.X509TrustManager
const val ISRG_ROOT_X1 = """-----BEGIN CERTIFICATE-----
MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4
WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu
ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY
MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc
h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+
0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6U
A5/TR5d8mUgjU+g4rk8Kb4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sW
T8KOEUt+zwvo/7V3LvSye0rgTBIlDHCNAymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyH
B5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ4Q7e2RCOFvu396j3x+UC
B5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf1b0SHzUv
KBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWn
OlFuhjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTn
jh8BCNAw1FtxNrQHusEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbw
qHyGO0aoSCqI3Haadr8faqU9GY/rOPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CI
rU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV
HRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY9umbbjANBgkq
hkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL
ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ
3BebYhtF8GaV0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KK
NFtY2PwByVS5uCbMiogziUwthDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5
ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJwTdwJx4nLCgdNbOhdjsnvzqvHu7Ur
TkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC
jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc
oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq
4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA
mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d
emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=
-----END CERTIFICATE-----"""
object SSLSettings {
val keyStore: KeyStore by lazy {
KeyStore.getInstance(KeyStore.getDefaultType()).apply {
load(null, null)
val certificateFactory = CertificateFactory.getInstance("X.509")
val certificate = certificateFactory.generateCertificate(ISRG_ROOT_X1.byteInputStream())
setCertificateEntry("isrgrootx1", certificate)
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()).apply {
init(null as KeyStore?)
trustManagers.filterIsInstance<X509TrustManager>().forEach { trustManager ->
trustManager.acceptedIssuers.forEach { acceptedIssuer ->
setCertificateEntry(acceptedIssuer.subjectDN.name, acceptedIssuer)
}
}
}
}
}
val trustManagerFactory: TrustManagerFactory? by lazy {
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()).apply {
init(keyStore)
}
}
val sslContext: SSLContext? by lazy {
SSLContext.getInstance("TLS").apply {
init(null, trustManagerFactory?.trustManagers, null)
}
}
val trustManager: X509TrustManager? by lazy {
trustManagerFactory?.trustManagers?.filterIsInstance<X509TrustManager>()?.firstOrNull()
}
}
@@ -0,0 +1,90 @@
package xyz.quaver.pupil.networking
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
val validNamespace = listOf(
"female",
"male",
"artist",
"group",
"character",
"series",
"type",
"language",
"tag"
)
class SearchQueryPreviewParameterProvider: PreviewParameterProvider<SearchQuery> {
override val values = sequenceOf(
SearchQuery.And(listOf(
SearchQuery.Or(listOf(
SearchQuery.And(listOf(
SearchQuery.Tag("language", "thisisareallylongtagyoucantevenseetheendofthis"),
SearchQuery.Tag("language", "korean"),
SearchQuery.Tag("female", "unusual pupil"),
SearchQuery.Tag("female", "collar")
)),
SearchQuery.And(listOf(
SearchQuery.Tag("language", "japanese"),
SearchQuery.Tag("female", "unusual pupil"),
SearchQuery.Tag("female", "collar")
))
)),
SearchQuery.Not(
SearchQuery.And(listOf(
SearchQuery.Tag("male", "yaoi"),
SearchQuery.Tag("group", "zenmai kourogi")
))
)
))
)
}
sealed interface SearchQuery {
data class Tag(
val namespace: String? = null,
val tag: String
): SearchQuery, TagLike {
companion object {
fun parseTag(tag: String): Tag {
val splitTag = tag.split(':', limit = 1)
return if (splitTag.size == 1) {
Tag(null, tag)
} else {
Tag(splitTag[0], splitTag[1])
}
}
}
override fun toString() = if (namespace == null) tag else "$namespace:$tag"
override fun toTag() = this
}
data class And(
val queries: List<SearchQuery>
): SearchQuery {
init {
if (queries.isEmpty()) {
error("queries cannot be empty")
}
}
}
data class Or(
val queries: List<SearchQuery>
): SearchQuery {
init {
if (queries.isEmpty()) {
error("queries cannot be empty")
}
}
}
data class Not(
val query: SearchQuery
): SearchQuery
}
@@ -0,0 +1,57 @@
/*
* Pupil, Hitomi.la viewer for Android
* Copyright (C) 2020 tom5079
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package xyz.quaver.pupil.services
import android.annotation.SuppressLint
import android.app.job.JobParameters
import android.app.job.JobService
import com.google.firebase.crashlytics.FirebaseCrashlytics
import dagger.hilt.android.AndroidEntryPoint
import io.ktor.util.cio.writeChannel
import io.ktor.util.collections.ConcurrentMap
import io.ktor.util.collections.ConcurrentSet
import io.ktor.utils.io.copyAndClose
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.cancelAndJoin
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import kotlinx.coroutines.withContext
import xyz.quaver.pupil.Pupil
import xyz.quaver.pupil.networking.GalleryFile
import xyz.quaver.pupil.networking.HitomiHttpClient
import java.io.File
@SuppressLint("SpecifyJobSchedulerIdRange")
@AndroidEntryPoint
class ImageCacheService : JobService() {
override fun onStartJob(params: JobParameters?): Boolean {
return false
}
override fun onStopJob(params: JobParameters?): Boolean {
return false
}
}
@@ -0,0 +1,22 @@
/*
* Pupil, Hitomi.la viewer for Android
* Copyright (C) 2022 tom5079
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package xyz.quaver.pupil.types
class SendLogException : Exception()
class JavascriptException(message: String?) : Exception(message)
@@ -0,0 +1,111 @@
/*
* Pupil, Hitomi.la viewer for Android
* Copyright (C) 2019 tom5079
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package xyz.quaver.pupil.types
import kotlinx.serialization.Serializable
@Serializable
data class Tag(val area: String?, val tag: String, val isNegative: Boolean = false) {
companion object {
fun parse(tag: String) : Tag {
if (tag.firstOrNull() == '-') {
tag.substring(1).split(Regex(":"), 2).let {
return when(it.size) {
2 -> Tag(it[0], it[1], true)
else -> Tag(null, tag, true)
}
}
}
tag.split(Regex(":"), 2).let {
return when(it.size) {
2 -> Tag(it[0], it[1])
else -> Tag(null, tag)
}
}
}
}
override fun toString(): String {
return (if (isNegative) "-" else "") + when(area) {
null -> tag
else -> "$area:$tag"
}
}
fun toQuery(): String {
return toString().replace(' ', '_')
}
override fun equals(other: Any?): Boolean {
if (other !is Tag)
return false
if (other.area == area && other.tag == tag)
return true
return false
}
override fun hashCode() = toString().hashCode()
}
class Tags(val tags: MutableSet<Tag> = mutableSetOf()) : MutableSet<Tag> by tags {
companion object {
fun parse(tags: String) : Tags {
return Tags(
tags.split(' ').map {
if (it.isNotEmpty())
Tag.parse(it)
else
null
}.filterNotNull().toMutableSet()
)
}
}
fun contains(element: String): Boolean {
tags.forEach {
if (it.toString() == element)
return true
}
return false
}
fun add(element: String): Boolean {
return tags.add(Tag.parse(element))
}
fun remove(element: String) {
tags.filter { it.toString() == element }.forEach {
tags.remove(it)
}
}
fun removeByArea(area: String, isNegative: Boolean? = null) {
tags.filter { it.area == area && (if(isNegative == null) true else (it.isNegative == isNegative)) }.forEach {
tags.remove(it)
}
}
override fun toString(): String {
return tags.joinToString(" ") { it.toString() }
}
}
@@ -0,0 +1,69 @@
/*
* Pupil, Hitomi.la viewer for Android
* Copyright (C) 2019 tom5079
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package xyz.quaver.pupil.ui
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi
import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass
import androidx.compose.runtime.getValue
import androidx.core.view.WindowCompat
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.navigation.compose.rememberNavController
import com.google.accompanist.adaptive.calculateDisplayFeatures
import xyz.quaver.pupil.ui.composable.MainApp
import xyz.quaver.pupil.ui.theme.AppTheme
import xyz.quaver.pupil.ui.viewmodel.MainViewModel
class MainActivity : ComponentActivity() {
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
val viewModel: MainViewModel by viewModels()
WindowCompat.setDecorFitsSystemWindows(window, false)
setContent {
AppTheme {
val windowSize = calculateWindowSizeClass(this)
val displayFeatures = calculateDisplayFeatures(this)
val uiState by viewModel.searchState.collectAsStateWithLifecycle()
val navController = rememberNavController()
MainApp(
windowSize = windowSize,
displayFeatures = displayFeatures,
uiState = uiState,
navController = navController,
openGalleryDetails = viewModel::openGalleryDetails,
closeGalleryDetails = viewModel::closeGalleryDetails,
onQueryChange = viewModel::onQueryChange,
loadSearchResult = viewModel::loadSearchResult
)
}
}
}
}
@@ -0,0 +1,5 @@
package xyz.quaver.pupil.ui.composable
enum class ContentType {
SINGLE_PANE, DUAL_PANE
}
@@ -0,0 +1,34 @@
package xyz.quaver.pupil.ui.composable
import android.graphics.Rect
import androidx.window.layout.FoldingFeature
import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.contract
sealed interface DevicePosture {
data object NormalPosture: DevicePosture
data class BookPosture(
val hingePosition: Rect
): DevicePosture
data class Separating(
val hingePosition: Rect,
val orientation: FoldingFeature.Orientation
): DevicePosture
}
@OptIn(ExperimentalContracts::class)
fun isBookPosture(foldingFeature: FoldingFeature?): Boolean {
contract { returns(true) implies (foldingFeature != null) }
return foldingFeature?.state == FoldingFeature.State.HALF_OPENED &&
foldingFeature.orientation == FoldingFeature.Orientation.VERTICAL
}
@OptIn(ExperimentalContracts::class)
fun isSeparating(foldingFeature: FoldingFeature?): Boolean {
contract { returns(true) implies (foldingFeature != null) }
return foldingFeature?.state == FoldingFeature.State.FLAT && foldingFeature.isSeparating
}
@@ -0,0 +1,504 @@
package xyz.quaver.pupil.ui.composable
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.FlowRow
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.InlineTextContent
import androidx.compose.foundation.text.appendInlineContent
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.BrokenImage
import androidx.compose.material.icons.filled.QuestionMark
import androidx.compose.material.icons.filled.StarOutline
import androidx.compose.material3.Card
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.Placeholder
import androidx.compose.ui.text.PlaceholderVerticalAlign
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import coil.compose.SubcomposeAsyncImage
import coil.request.ImageRequest
import xyz.quaver.pupil.R
import xyz.quaver.pupil.networking.Artist
import xyz.quaver.pupil.networking.Character
import xyz.quaver.pupil.networking.GalleryFile
import xyz.quaver.pupil.networking.GalleryInfo
import xyz.quaver.pupil.networking.GalleryTag
import xyz.quaver.pupil.networking.Group
import xyz.quaver.pupil.networking.HitomiHttpClient
import xyz.quaver.pupil.networking.Language
import xyz.quaver.pupil.networking.SearchQuery
import xyz.quaver.pupil.networking.Series
import xyz.quaver.pupil.networking.joinToCapitalizedString
import xyz.quaver.pupil.ui.theme.Blue500
import xyz.quaver.pupil.ui.theme.Green500
import xyz.quaver.pupil.ui.theme.Purple500
import xyz.quaver.pupil.ui.theme.Red500
import xyz.quaver.pupil.ui.theme.Yellow500
private val languageMap = mapOf(
"indonesian" to "Bahasa Indonesia",
"catalan" to "català",
"cebuano" to "Cebuano",
"czech" to "Čeština",
"danish" to "Dansk",
"german" to "Deutsch",
"estonian" to "eesti",
"english" to "English",
"spanish" to "Español",
"esperanto" to "Esperanto",
"french" to "Français",
"italian" to "Italiano",
"latin" to "Latina",
"hungarian" to "magyar",
"dutch" to "Nederlands",
"norwegian" to "norsk",
"polish" to "polski",
"portuguese" to "Português",
"romanian" to "română",
"albanian" to "shqip",
"slovak" to "Slovenčina",
"finnish" to "Suomi",
"swedish" to "Svenska",
"tagalog" to "Tagalog",
"vietnamese" to "tiếng việt",
"turkish" to "Türkçe",
"greek" to "Ελληνικά",
"mongolian" to "Монгол",
"russian" to "Русский",
"ukrainian" to "Українська",
"hebrew" to "עברית",
"arabic" to "العربية",
"persian" to "فارسی",
"thai" to "ไทย",
"korean" to "한국어",
"chinese" to "中文",
"japanese" to "日本語"
)
private val galleryTypeStringMap = mapOf(
"doujinshi" to R.string.doujinshi,
"manga" to R.string.manga,
"artistcg" to R.string.artist_cg,
"gamecg" to R.string.game_cg,
"imageset" to R.string.image_set
)
private val galleryTypeColorMap = mapOf(
"doujinshi" to Red500,
"manga" to Yellow500,
"artistcg" to Purple500,
"gamecg" to Green500,
"imageset" to Blue500
)
class GalleryInfoProvider: PreviewParameterProvider<GalleryInfo> {
override val values = sequenceOf(
GalleryInfo(
id = "2296437",
title = "Kakyuu Majutsushi, Inmon ni Somaru | 하급 마술사, 음문에 물들다",
language = "korean",
type = "doujinshi",
date = "2022-08-11 07:14:00-05",
artists = listOf(Artist("wagashi")),
groups = listOf(Group("dagashiya")),
series = listOf(Series("original")),
tags = listOf(
GalleryTag("ahegao", female="1"),
GalleryTag("big penis", male="1"),
GalleryTag("bike shorts", female="1"),
GalleryTag("blowjob", female="1"),
GalleryTag("blowjob face", female="1"),
GalleryTag("bukkake", female="1"),
GalleryTag("bunny girl", female="1"),
GalleryTag("clone", male="1"),
GalleryTag("corruption", female="1"),
GalleryTag("crotch tattoo", female="1"),
GalleryTag("gloves", female="1"),
GalleryTag("gokkun", female="1"),
GalleryTag("group"),
GalleryTag("kemonomimi", female="1"),
GalleryTag("leotard", female="1"),
GalleryTag("lingerie", female="1"),
GalleryTag("loli", female="1"),
GalleryTag("masked face", female="1"),
GalleryTag("masturbation", female="1"),
GalleryTag("mind control", female="1"),
GalleryTag("mmf threesome"),
GalleryTag("moral degeneration", female="1"),
GalleryTag("mouth mask", female="1"),
GalleryTag("nakadashi", female="1"),
GalleryTag("prostitution", female="1"),
GalleryTag("smell", male="1"),
GalleryTag("unusual pupils", female="1"),
),
related = listOf(2806924, 2806923, 2319091, 1647024, 2580808),
languages = listOf(
Language(galleryID="2806923", name="korean"),
Language(galleryID="2609305", name="english"),
Language(galleryID="2302333", name="spanish"),
Language(galleryID="2392785", name="portuguese"),
Language(galleryID="2303940", name="russian"),
Language(galleryID="2736129", name="chinese"),
Language(galleryID="2295647", name="japanese")
),
characters = listOf(Character("Kakyuu Majutsushi")),
files = listOf(
GalleryFile(name="01.jpg", hash="d441383396a6ba41a2db914328dc80d16b5191e53d23a5f0f9f8a0cd8f2e7cef", width=4185, height=6000, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="02.png", hash="a42517a19c7db6369749807bbc6676906e35709be07f780247f2e68d516ed1d5", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="03.png", hash="ee0841953755f34a0a146a7f757cf2993c678384f53e88715b1c97a00abe5c27", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="04.png", hash="66fafca77a7ed0287666e77fe268a02f75b4e27c2b9b77e6577bb3132396132b", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="05.png", hash="0ef8081ad9eef5093077c8551e87903e8b275e607634717857c2986e8d3c51a9", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="06.png", hash="2e59ffd59fa761355ea855a9e0f366cb39569207165a99659a9f0868cbba7e94", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="07.png", hash="5dc19fb97a2f1c64cae5634cd651f593d022b3114bbacaab15ba114be581cbea", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="08.png", hash="9121781d4f8fb1aaaee124f82c2ab98c97eb3e1f9508bab7c1d8771bb5eddfdb", width=4520, height=6295, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="09.png", hash="e5ceae4da5e497bd95a79a607f2c85bb3e8dc7386e041086cd5ccb9a9fb4dcb1", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="10.png", hash="be56219811a29f86dfcf5a7af0b25addc7436b134acd1a94d51c69c987da9d1b", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="11.png", hash="4e3b09ac015360ad4daffcea46265f3eb319bbe638ce90f26d4cbae37dc8c0f1", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="12.png", hash="5d57c0a0cd00604382eeaf0b32446b938dafc9d980eb086673e1fa0307166e39", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="13.png", hash="1ff2313fe979b52b826d482be90699a7c086afc251fa22306e92dfc582611f10", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="14.png", hash="7ad92a9408a059afafc68d3086c5f6a070c7e0d550bc2d328b5c9e16a62be01c", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="15.png", hash="4a6db95b7111b647e450c155af07c617d28313c02871ed94ad0c5986d3c5d1aa", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="16.png", hash="d4b53bf416c9bd2f72850e80ddaaf8467c663c72433c8ebebf3a70742fea7c32", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="17.png", hash="d189d5321f18414de816c049d3e2d72a7d31124d628037ca9f7da4572025cf01", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="18.png", hash="3ff372d7ba4e34cff9f7b46f5323e60b36f9b9df3dd5d02be4c71de4a7ee23c7", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="19.png", hash="2965852c2000fb17f756263b47ca196563995be2d03143f64c297f5930248d1e", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="20.png", hash="3713f95947cc6df0b67af5532a440f023c99ee37d483f3f9252400168e3a55ad", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="21.png", hash="c0b2b2d5ee79c3dc3b737c0eaff19ed1a731d81495adc2c94260de7ebbd85415", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="22.png", hash="8835fe309a26fce6882c0fcdf37cbd5f5bcc69dd2c32e436deb644891ca8499b", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="23.png", hash="5eb28619c1919ad29b86fb6cdaeccd50ad2ad857c81f56c060e8b66a2ed315d0", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="24.png", hash="7ea3ecf4c0b0e5e632163a5b0dc2475a071e1209a0fed8e8e49243093c35babb", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="25.png", hash="d01355724eb60c41e43159607652812d1fbbbac12962b2f9068a9e620ee0c246", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="26.png", hash="58a33c1d709b005a17600f7beb14a81711a106619bdb029d30646a9060c245c7", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="27.png", hash="0b18753f2fe7ea97c2e2c13a082a5a675f36085558bcd3fb7be916b6118c6000", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="28.png", hash="e8f0a2f9d35ec2c1974a4aea07eefd792462049e7b0972bf8cd5532dd82cee21", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="29.png", hash="90ec7a13aedf22c1f9317f75e843a4ace4e236d6100a8c8bb5aeb8160ff1cd00", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="30.png", hash="3229400975e6cef763c54a82a4ce0e6f51ec41c9b674072e74f66b41e325b655", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="31.png", hash="4e04efa56981804f7d13858a98935038fe421956367dcabba8e9118d273135d5", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="32.png", hash="e0d8641127aaaf587ec5e3040c49edee9cda866a5f1f377e567b908514b1eb68", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="33.png", hash="00125ab9090be7d3462fd6943c209bc68c236ef50ca0f1552530fd8253d87f7d", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="34.png", hash="1ea303198badaecfcf66a438baa6867690416d77a542f1ff0181b1895df95ccb", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="35.png", hash="40181ac057808a16716e640c462cc2b992822999ab8db43d454bb331d50bd39f", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="36.png", hash="92cbe1067c1c554c5a2e01b58b6fb86677a523cba586dfa209d61b4af70b2f54", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="37.png", hash="4fbbdc6d5450eb1f2f7e45a97ce8360d43e199454a8eb9e536740309c2067999", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="38.png", hash="0cb74b8af27e51604c728a26cf4788899fa04f854853badea9884b008c024e94", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="39.png", hash="254676c13ab418ce1110a9bad009554abc72af7e2ff9d719409881ea3c635d46", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="40.png", hash="33527e1171b9cf21ab164be2b76cb5b9daa91980a3330f2441dd9bf911e2e05b", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="41.png", hash="4dc331acb058665500aa308143c106efb6999855d1c3b0665c1dd331c8364430", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="42.png", hash="7674f03fa02cf96a20f1e192caf76d85e7e556add0cdb65aabdc86d417093d39", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="43.png", hash="27a4a280483142b213b26d53f06b991be35122cb263c69a87435e624b2a307fd", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="44.png", hash="3114ba3bff094abbae9160656894d462e0567cea23e6fa2693469c5e7defa6fe", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="45.png", hash="dc22ffed6a678a560e781f795b3ee0876ec8726ae2af942226710102758d44db", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="46.png", hash="4f7257ad75b990cc2b8dad0c5a09a831cb1670e7aaeadc71809f4bd7400f0071", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="47.png", hash="bf74fcd74ce77b5089bac98dc9f5737ba1fe87cdcfb01ad80e63024c93f82692", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="48.png", hash="d0baed210584183efa654ca7a483c558afe9eb18b71452ed2cfd4264b269ffca", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="49.png", hash="2b9c90a038e4e918655dffa84fbbb08cbedfce642277b1140d070aa9a711ebac", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="50.png", hash="cdfba6a9b8a570f2f317fb01e66ebc72ede5735a41256b326a38af2296799095", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="51.png", hash="84ad9d51aab2e8ae1cbb5a0918cc3f62473e98512db9f473ab1ffe3a4f7aa75a", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="52.png", hash="0d7a420aa23e23cee7f8e124b12080e309cffb3d7269389f23e1ac3d5b7363a5", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="53.png", hash="575cf99346f9786d6e30bc163dc6d5fa439bd157a9ffce90586bfc5657121981", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="54.png", hash="9004d3fd46dc278b79cf7a5bf72002dd4b0b03ad6bded30ceebcb633185b49ce", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="55.png", hash="8e53c301e2c2b539783c7b8c4f5028f221198d33e114dcc40e6a0025aee840ab", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="56.png", hash="576764073554fcf644c12d80f26b3bae42f39f3516ed7841c9e297248324b237", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="57.png", hash="110da01b9ae7ed4a145792f55498a5efa22cebec4da84f6220904840b508c75e", width=4535, height=6307, hasWebP=1, hasAVIF=1, hasJXL=0),
GalleryFile(name="58.jpg", hash="3ae38577135465b6224e0487c0cdcd37cf11764883f3b78a67545d48c6beade5", width=4260, height=6000, hasWebP=1, hasAVIF=1, hasJXL=0),
)
)
)
}
@OptIn(ExperimentalLayoutApi::class)
@Composable
fun TagGroup(tags: List<SearchQuery.Tag>, folded: Boolean = false) {
var isFolded by remember { mutableStateOf(folded) }
FlowRow(
horizontalArrangement = Arrangement.spacedBy(4.dp),
verticalArrangement = Arrangement.spacedBy(4.dp)
) {
tags.sortedBy {
when(it.namespace) {
"female" -> 1
"male" -> 2
else -> 3
}
}.let {
if (isFolded) it.take(10) else it
}.forEach { tag ->
TagChip(tag = tag.toTag())
}
if (isFolded && tags.size > 10)
Surface(
modifier = Modifier.height(32.dp),
color = MaterialTheme.colorScheme.surface,
shape = RoundedCornerShape(16.dp),
onClick = { isFolded = false }
) {
Text(
"…",
modifier = Modifier.padding(16.dp, 8.dp),
color = MaterialTheme.colorScheme.onSurface,
style = MaterialTheme.typography.bodyMedium
)
}
}
}
@Composable
fun GalleryTypeIndicator(galleryType: String) {
Surface(
modifier = Modifier.height(32.dp),
color = galleryTypeColorMap[galleryType] ?: MaterialTheme.colorScheme.surface,
shape = RoundedCornerShape(16.dp)
) {
Box(Modifier.fillMaxHeight()) {
Text(
galleryTypeStringMap[galleryType]?.let { stringResource(it) } ?: galleryType,
modifier = Modifier
.padding(horizontal = 16.dp)
.align(Alignment.Center),
style = MaterialTheme.typography.bodyMedium,
color = Color.White
)
}
}
}
@Composable
fun LanguageTitle(title: String, language: String?) {
val icon = languageIconMap[language]
if (icon != null) {
Text(
buildAnnotatedString {
appendInlineContent("language", "<language>")
append(' ')
append(title)
},
style = MaterialTheme.typography.headlineSmall,
inlineContent = mapOf(
"language" to InlineTextContent(
Placeholder(
width = 20.sp,
height = 20.sp,
placeholderVerticalAlign = PlaceholderVerticalAlign.Center
)
) {
Icon(
painterResource(icon),
contentDescription = null,
tint = Color.Unspecified
)
}
)
)
} else {
Text(title, style = MaterialTheme.typography.headlineSmall)
}
}
@Composable
fun DetailedGalleryInfoHeader(galleryInfo: GalleryInfo, thumbnailUrl: String?) {
val thumbnailFile = galleryInfo.files.first()
val aspectRatio = thumbnailFile.let { it.width / it.height.toFloat() }
if (thumbnailFile.let { it.width > it.height }) {
Column {
if (thumbnailUrl != null) {
SubcomposeAsyncImage(
model = ImageRequest.Builder(LocalContext.current)
.data(thumbnailUrl)
.setHeader("Referer", "https://hitomi.la/")
.build(),
modifier = Modifier
.fillMaxWidth()
.aspectRatio(aspectRatio)
.clip(RoundedCornerShape(8.dp)),
loading = { CircularProgressIndicator(Modifier.align(Alignment.Center)) },
error = {
Icon(
Icons.Default.BrokenImage,
contentDescription = null,
)
},
contentDescription = "Thumbnail"
)
} else {
Box(
Modifier
.fillMaxWidth()
.aspectRatio(aspectRatio)) {
CircularProgressIndicator(Modifier.align(Alignment.Center))
}
}
Spacer(Modifier.height(8.dp))
LanguageTitle(galleryInfo.title, galleryInfo.language)
val artistsAndGroups = buildString {
if (!galleryInfo.artists.isNullOrEmpty())
append(galleryInfo.artists.joinToCapitalizedString())
if (!galleryInfo.groups.isNullOrEmpty()) {
if (this.isNotEmpty()) append(' ')
append('(')
append(galleryInfo.groups.joinToCapitalizedString())
append(')')
}
}
if (artistsAndGroups.isNotEmpty()) {
Text(
artistsAndGroups,
style = MaterialTheme.typography.labelLarge,
)
}
}
} else {
Row(
horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalAlignment = Alignment.CenterVertically
) {
if (thumbnailUrl != null) {
SubcomposeAsyncImage(
model = ImageRequest.Builder(LocalContext.current)
.data(thumbnailUrl)
.setHeader("Referer", "https://hitomi.la/")
.build(),
modifier = Modifier
.height(200.dp)
.aspectRatio(aspectRatio)
.clip(RoundedCornerShape(8.dp)),
loading = { CircularProgressIndicator(Modifier.align(Alignment.Center)) },
error = {
Icon(
Icons.Default.BrokenImage,
contentDescription = null,
)
},
contentDescription = "Thumbnail"
)
} else {
Box(
Modifier
.height(200.dp)
.aspectRatio(aspectRatio)) {
CircularProgressIndicator(Modifier.align(Alignment.Center))
}
}
Column(Modifier.heightIn(min = 200.dp)) {
LanguageTitle(galleryInfo.title, galleryInfo.language)
val artistsAndGroups = buildString {
if (!galleryInfo.artists.isNullOrEmpty())
append(galleryInfo.artists.joinToCapitalizedString())
if (!galleryInfo.groups.isNullOrEmpty()) {
if (this.isNotEmpty()) append(' ')
append('(')
append(galleryInfo.groups.joinToCapitalizedString())
append(')')
}
}
if (artistsAndGroups.isNotEmpty()) {
Text(
artistsAndGroups,
style = MaterialTheme.typography.labelLarge
)
}
}
}
}
}
@Preview
@Composable
fun DetailedGalleryInfo(
@PreviewParameter(GalleryInfoProvider::class) galleryInfo: GalleryInfo,
modifier: Modifier = Modifier,
) {
var thumbnailUrl by remember { mutableStateOf<String?>(null) }
LaunchedEffect(galleryInfo) {
thumbnailUrl = galleryInfo.files.firstOrNull()?.let {
HitomiHttpClient.getImageURL(it, true).firstOrNull()
} ?: ""
}
Card(modifier) {
Column(Modifier.padding(8.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) {
DetailedGalleryInfoHeader(galleryInfo, thumbnailUrl)
GalleryTypeIndicator(galleryInfo.type)
if (galleryInfo.tags?.isNotEmpty() == true) {
TagGroup(galleryInfo.tags.map { it.toTag() }, folded = true)
}
HorizontalDivider()
Box(
Modifier
.fillMaxWidth()
.padding(4.dp)) {
Text(
modifier = Modifier.align(Alignment.CenterStart),
text = galleryInfo.id,
style = MaterialTheme.typography.bodyMedium
)
Text(
modifier = Modifier.align(Alignment.Center),
text = "${galleryInfo.files.size}P",
style = MaterialTheme.typography.bodyMedium
)
Icon(
modifier = Modifier
.align(Alignment.CenterEnd)
.size(32.dp),
imageVector = Icons.Default.StarOutline,
contentDescription = null,
tint = Yellow500
)
}
}
}
}
@@ -0,0 +1,306 @@
package xyz.quaver.pupil.ui.composable
import android.util.Log
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.consumeWindowInsets
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.ime
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.material3.DrawerValue
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ModalNavigationDrawer
import androidx.compose.material3.PermanentNavigationDrawer
import androidx.compose.material3.Text
import androidx.compose.material3.rememberDrawerState
import androidx.compose.material3.windowsizeclass.WindowHeightSizeClass
import androidx.compose.material3.windowsizeclass.WindowSizeClass
import androidx.compose.material3.windowsizeclass.WindowWidthSizeClass
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController
import androidx.navigation.activity
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.window.layout.DisplayFeature
import androidx.window.layout.FoldingFeature
import kotlinx.coroutines.launch
import xyz.quaver.pupil.R
import xyz.quaver.pupil.networking.GalleryInfo
import xyz.quaver.pupil.networking.SearchQuery
import xyz.quaver.pupil.ui.viewmodel.SearchState
@Composable
fun MainApp(
windowSize: WindowSizeClass,
displayFeatures: List<DisplayFeature>,
uiState: SearchState,
navController: NavHostController,
openGalleryDetails: (GalleryInfo) -> Unit,
closeGalleryDetails: () -> Unit,
onQueryChange: (SearchQuery?) -> Unit,
loadSearchResult: (IntRange) -> Unit,
) {
val navigationType: NavigationType
val contentType: ContentType
val foldingFeature: FoldingFeature? = displayFeatures.filterIsInstance<FoldingFeature>().firstOrNull()
val foldingDevicePosture = when {
isBookPosture(foldingFeature) -> DevicePosture.BookPosture(foldingFeature.bounds)
isSeparating(foldingFeature) -> DevicePosture.Separating(foldingFeature.bounds, foldingFeature.orientation)
else -> DevicePosture.NormalPosture
}
when (windowSize.widthSizeClass) {
WindowWidthSizeClass.Compact -> {
navigationType = NavigationType.BOTTOM_NAVIGATION
contentType = ContentType.SINGLE_PANE
}
WindowWidthSizeClass.Medium -> {
navigationType = NavigationType.NAVIGATION_RAIL
contentType = if (foldingDevicePosture != DevicePosture.NormalPosture) {
ContentType.DUAL_PANE
} else {
ContentType.SINGLE_PANE
}
}
WindowWidthSizeClass.Expanded -> {
navigationType = if (foldingDevicePosture is DevicePosture.BookPosture) {
NavigationType.NAVIGATION_RAIL
} else {
NavigationType.PERMANENT_NAVIGATION_DRAWER
}
contentType = ContentType.DUAL_PANE
}
else -> {
navigationType = NavigationType.BOTTOM_NAVIGATION
contentType = ContentType.SINGLE_PANE
}
}
val navigationContentPosition = when (windowSize.heightSizeClass) {
WindowHeightSizeClass.Compact -> NavigationContentPosition.TOP
WindowHeightSizeClass.Medium,
WindowHeightSizeClass.Expanded -> NavigationContentPosition.CENTER
else -> NavigationContentPosition.TOP
}
MainNavigationWrapper(
navigationType,
contentType,
displayFeatures,
navigationContentPosition,
uiState,
navController,
openGalleryDetails = openGalleryDetails,
closeGalleryDetails = closeGalleryDetails,
onQueryChange = onQueryChange,
loadSearchResult = loadSearchResult
)
}
@Composable
private fun MainNavigationWrapper(
navigationType: NavigationType,
contentType: ContentType,
displayFeatures: List<DisplayFeature>,
navigationContentPosition: NavigationContentPosition,
uiState: SearchState,
navController: NavHostController,
openGalleryDetails: (GalleryInfo) -> Unit,
closeGalleryDetails: () -> Unit,
onQueryChange: (SearchQuery?) -> Unit,
loadSearchResult: (IntRange) -> Unit
) {
val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)
val coroutineScope = rememberCoroutineScope()
val navBackStackEntry by navController.currentBackStackEntryAsState()
val currentRoute = navBackStackEntry?.destination?.route
val openDrawer: () -> Unit = {
coroutineScope.launch {
drawerState.open()
}
}
if (navigationType == NavigationType.PERMANENT_NAVIGATION_DRAWER) {
PermanentNavigationDrawer(
drawerContent = {
PermanentNavigationDrawerContent(
selectedDestination = currentRoute,
navigateToDestination = { navController.navigate(it.route) {
popUpTo(MainDestination.Search.route)
launchSingleTop = true
} },
navigationContentPosition = navigationContentPosition,
)
}
) {
MainContent(
navigationType = navigationType,
contentType = contentType,
displayFeatures = displayFeatures,
uiState = uiState,
navController = navController,
onDrawerClicked = openDrawer,
openGalleryDetails = openGalleryDetails,
closeGalleryDetails = closeGalleryDetails,
onQueryChange = onQueryChange,
loadSearchResult = loadSearchResult,
)
}
} else {
ModalNavigationDrawer(
drawerContent = {
ModalNavigationDrawerContent(
selectedDestination = currentRoute,
navigateToDestination = { navController.navigate(it.route) {
popUpTo(MainDestination.Search.route)
launchSingleTop = true
} },
navigationContentPosition = navigationContentPosition,
onDrawerClicked = {
coroutineScope.launch {
drawerState.close()
}
}
)
},
drawerState = drawerState
) {
MainContent(
navigationType = navigationType,
contentType = contentType,
displayFeatures = displayFeatures,
uiState = uiState,
navController = navController,
onDrawerClicked = openDrawer,
openGalleryDetails = openGalleryDetails,
closeGalleryDetails = closeGalleryDetails,
onQueryChange = onQueryChange,
loadSearchResult = loadSearchResult,
)
}
}
}
@Composable
fun NotImplemented() {
Box(Modifier.fillMaxSize()) {
Column(
Modifier.align(Alignment.Center),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(16.dp)
) {
Text("(⁄ ⁄•⁄ω⁄•⁄ ⁄)", style = MaterialTheme.typography.headlineMedium, color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.5f))
Text(stringResource(R.string.not_implemented), textAlign = TextAlign.Center)
}
}
}
@Composable
fun MainContent(
navigationType: NavigationType,
contentType: ContentType,
displayFeatures: List<DisplayFeature>,
uiState: SearchState,
navController: NavHostController,
onDrawerClicked: () -> Unit,
openGalleryDetails: (GalleryInfo) -> Unit,
closeGalleryDetails: () -> Unit,
onQueryChange: (SearchQuery?) -> Unit,
loadSearchResult: (IntRange) -> Unit,
) {
val navBackStackEntry by navController.currentBackStackEntryAsState()
val currentRoute = navBackStackEntry?.destination?.route
Row(modifier = Modifier.fillMaxSize()) {
AnimatedVisibility(visible = navigationType == NavigationType.NAVIGATION_RAIL) {
MainNavigationRail(
selectedDestination = currentRoute,
navigateToDestination = { navController.navigate(it.route) {
popUpTo(MainDestination.Search.route)
launchSingleTop = true
} },
onDrawerClicked = onDrawerClicked
)
}
Column(
modifier = Modifier
.fillMaxSize()
.background(MaterialTheme.colorScheme.inverseOnSurface)
) {
Box(
modifier = Modifier
.weight(1f)
.run {
if (navigationType == NavigationType.BOTTOM_NAVIGATION) {
this
.consumeWindowInsets(WindowInsets.ime)
.consumeWindowInsets(WindowInsets.navigationBars)
} else this
}
) {
NavHost(
modifier = Modifier.fillMaxSize(),
navController = navController,
startDestination = MainDestination.Search.route
) {
composable(MainDestination.Search.route) {
SearchScreen(
contentType = contentType,
displayFeatures = displayFeatures,
uiState = uiState,
openGalleryDetails = openGalleryDetails,
closeGalleryDetails = closeGalleryDetails,
onQueryChange = onQueryChange,
loadSearchResult = loadSearchResult,
openGallery = {
navController.navigate(MainDestination.ImageViewer(it.id).route) {
launchSingleTop = true
}
}
)
}
composable(MainDestination.History.route) {
NotImplemented()
}
composable(MainDestination.Downloads.route) {
NotImplemented()
}
composable(MainDestination.Favorites.route) {
NotImplemented()
}
composable(MainDestination.Settings.route) {
NotImplemented()
}
composable(MainDestination.ImageViewer.commonRoute) {
NotImplemented()
}
}
}
AnimatedVisibility(visible = navigationType == NavigationType.BOTTOM_NAVIGATION) {
BottomNavigationBar(
selectedDestination = currentRoute,
navigateToDestination = { navController.navigate(it.route) {
popUpTo(MainDestination.Search.route)
launchSingleTop = true
} }
)
}
}
}
}
@@ -0,0 +1,67 @@
package xyz.quaver.pupil.ui.composable
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.MenuBook
import androidx.compose.material.icons.filled.Download
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.material.icons.filled.History
import androidx.compose.material.icons.filled.MenuBook
import androidx.compose.material.icons.filled.Search
import androidx.compose.material.icons.filled.Settings
import androidx.compose.material.icons.filled.Star
import androidx.compose.ui.graphics.vector.ImageVector
import xyz.quaver.pupil.R
sealed interface MainDestination {
val route: String
val icon: ImageVector
val textId: Int
data object Search: MainDestination {
override val route = "search"
override val icon = Icons.Default.Search
override val textId = R.string.main_destination_search
}
data object History: MainDestination {
override val route = "history"
override val icon = Icons.Default.History
override val textId = R.string.main_destination_history
}
data object Downloads: MainDestination {
override val route = "downloads"
override val icon = Icons.Default.Download
override val textId = R.string.main_destination_downloads
}
data object Favorites: MainDestination {
override val route = "favorites"
override val icon = Icons.Default.Favorite
override val textId = R.string.main_destination_favorites
}
data object Settings: MainDestination {
override val route = "settings"
override val icon = Icons.Default.Settings
override val textId = R.string.main_destination_settings
}
class ImageViewer(galleryID: String): MainDestination {
override val route = "image_viewer/$galleryID"
override val icon = Icons.AutoMirrored.Filled.MenuBook
override val textId = R.string.main_destination_image_viewer
companion object {
val commonRoute = "image_viewer/{galleryID}"
}
}
}
val mainDestinations = listOf(
MainDestination.Search,
MainDestination.History,
MainDestination.Downloads,
MainDestination.Favorites,
MainDestination.Settings
)
@@ -0,0 +1,5 @@
package xyz.quaver.pupil.ui.composable
enum class NavigationContentPosition {
TOP, CENTER
}
@@ -0,0 +1,294 @@
package xyz.quaver.pupil.ui.composable
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.ime
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.sizeIn
import androidx.compose.foundation.layout.union
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.MenuOpen
import androidx.compose.material.icons.filled.Menu
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ModalDrawerSheet
import androidx.compose.material3.NavigationBar
import androidx.compose.material3.NavigationBarItem
import androidx.compose.material3.NavigationDrawerItem
import androidx.compose.material3.NavigationDrawerItemDefaults
import androidx.compose.material3.NavigationRail
import androidx.compose.material3.NavigationRailItem
import androidx.compose.material3.PermanentDrawerSheet
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.Layout
import androidx.compose.ui.layout.Measurable
import androidx.compose.ui.layout.MeasurePolicy
import androidx.compose.ui.layout.layoutId
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.offset
import androidx.navigation.NavDestination
import xyz.quaver.pupil.R
@Composable
fun PermanentNavigationDrawerContent(
selectedDestination: String?,
navigateToDestination: (MainDestination) -> Unit,
navigationContentPosition: NavigationContentPosition,
) {
PermanentDrawerSheet(
modifier = Modifier.sizeIn(minWidth = 200.dp, maxWidth = 300.dp),
drawerContainerColor = MaterialTheme.colorScheme.inverseOnSurface
) {
Layout(
modifier = Modifier
.background(MaterialTheme.colorScheme.inverseOnSurface)
.padding(16.dp),
content = {
Row(
modifier = Modifier.layoutId(LayoutType.HEADER),
verticalAlignment = Alignment.CenterVertically
) {
Icon(
modifier = Modifier.size(32.dp),
painter = painterResource(R.drawable.app_icon),
tint = Color.Unspecified,
contentDescription = "app icon"
)
Text(
modifier = Modifier.padding(16.dp),
text = "Pupil",
style = MaterialTheme.typography.titleLarge.copy(fontWeight = FontWeight.Bold),
color = MaterialTheme.colorScheme.primary
)
}
Column(
modifier = Modifier
.layoutId(LayoutType.CONTENT)
.verticalScroll(rememberScrollState()),
horizontalAlignment = Alignment.CenterHorizontally
) {
mainDestinations.forEach { destination ->
NavigationDrawerItem(
label = {
Text(
text = stringResource(destination.textId),
modifier = Modifier.padding(16.dp)
)
},
icon = {
Icon(
imageVector = destination.icon,
contentDescription = stringResource(destination.textId)
)
},
selected = selectedDestination == destination.route,
colors = NavigationDrawerItemDefaults.colors(
unselectedContainerColor = Color.Transparent
),
onClick = { navigateToDestination(destination) }
)
}
}
},
measurePolicy = navigationMeasurePolicy(navigationContentPosition)
)
}
}
@Composable
fun ModalNavigationDrawerContent(
selectedDestination: String?,
navigationContentPosition: NavigationContentPosition,
navigateToDestination: (MainDestination) -> Unit,
onDrawerClicked: () -> Unit
) {
ModalDrawerSheet {
Layout(
modifier = Modifier
.background(MaterialTheme.colorScheme.inverseOnSurface)
.padding(16.dp),
content = {
Row(
modifier = Modifier
.layoutId(LayoutType.HEADER)
.fillMaxWidth()
.padding(16.dp),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Row(
verticalAlignment = Alignment.CenterVertically
) {
Icon(
modifier = Modifier.size(32.dp),
painter = painterResource(R.drawable.app_icon),
tint = Color.Unspecified,
contentDescription = "app icon"
)
Text(
modifier = Modifier.padding(16.dp),
text = "Pupil",
style = MaterialTheme.typography.titleLarge.copy(fontWeight = FontWeight.Bold),
color = MaterialTheme.colorScheme.primary
)
}
IconButton(onClick = onDrawerClicked) {
Icon(
imageVector = Icons.AutoMirrored.Default.MenuOpen,
contentDescription = stringResource(R.string.main_open_navigation_drawer)
)
}
}
Column (
modifier = Modifier
.layoutId(LayoutType.CONTENT)
.verticalScroll(rememberScrollState()),
horizontalAlignment = Alignment.CenterHorizontally
) {
mainDestinations.forEach { destination ->
NavigationDrawerItem(
label = {
Text(
text = stringResource(destination.textId),
modifier = Modifier.padding(16.dp)
)
},
icon = {
Icon(
imageVector = destination.icon,
contentDescription = stringResource(destination.textId)
)
},
selected = selectedDestination == destination.route,
colors = NavigationDrawerItemDefaults.colors(
unselectedContainerColor = Color.Transparent
),
onClick = { navigateToDestination(destination) }
)
}
}
},
measurePolicy = navigationMeasurePolicy(navigationContentPosition)
)
}
}
@Composable
fun MainNavigationRail(
selectedDestination: String?,
navigateToDestination: (MainDestination) -> Unit,
onDrawerClicked: () -> Unit
) {
NavigationRail (
modifier = Modifier.fillMaxHeight(),
containerColor = MaterialTheme.colorScheme.inverseOnSurface
) {
NavigationRailItem(
selected = false,
onClick = onDrawerClicked,
icon = {
Icon(
imageVector = Icons.Default.Menu,
contentDescription = stringResource(R.string.main_open_navigation_drawer)
)
}
)
Column(
modifier = Modifier.verticalScroll(rememberScrollState()),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(4.dp)
) {
mainDestinations.forEach { destination ->
NavigationRailItem(
selected = selectedDestination == destination.route,
onClick = { navigateToDestination(destination) },
icon = {
Icon(
imageVector = destination.icon,
contentDescription = stringResource(destination.textId)
)
}
)
}
}
}
}
@Composable
fun BottomNavigationBar(
selectedDestination: String?,
navigateToDestination: (MainDestination) -> Unit
) {
NavigationBar(modifier = Modifier.fillMaxWidth(), windowInsets = WindowInsets.ime.union(WindowInsets.navigationBars)) {
mainDestinations.forEach { destination ->
NavigationBarItem(
selected = selectedDestination == destination.route,
onClick = { navigateToDestination(destination) },
icon = {
Icon(
imageVector = destination.icon,
contentDescription = stringResource(destination.textId)
)
}
)
}
}
}
fun navigationMeasurePolicy(
navigationContentPosition: NavigationContentPosition,
): MeasurePolicy {
return MeasurePolicy { measurables, constraints ->
lateinit var headerMeasurable: Measurable
lateinit var contentMeasurable: Measurable
measurables.forEach {
when (it.layoutId) {
LayoutType.HEADER -> headerMeasurable = it
LayoutType.CONTENT -> contentMeasurable = it
else -> error("Unknown layoutId encountered!")
}
}
val headerPlaceable = headerMeasurable.measure(constraints)
val contentPlaceable = contentMeasurable.measure(
constraints.offset(vertical = -headerPlaceable.height)
)
layout(constraints.maxWidth, constraints.maxHeight) {
headerPlaceable.placeRelative(0, 0)
val nonContentVerticalSpace = constraints.maxHeight - contentPlaceable.height
val contentPlaceableY = when (navigationContentPosition) {
NavigationContentPosition.TOP -> 0
NavigationContentPosition.CENTER -> nonContentVerticalSpace / 2
}.coerceAtLeast(headerPlaceable.height)
contentPlaceable.placeRelative(0, contentPlaceableY)
}
}
}
enum class LayoutType {
HEADER, CONTENT
}
@@ -0,0 +1,5 @@
package xyz.quaver.pupil.ui.composable
enum class NavigationType {
NAVIGATION_RAIL, PERMANENT_NAVIGATION_DRAWER, BOTTOM_NAVIGATION
}
@@ -0,0 +1,217 @@
package xyz.quaver.pupil.ui.composable
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.gestures.awaitEachGesture
import androidx.compose.foundation.gestures.awaitFirstDown
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.NavigateBefore
import androidx.compose.material.icons.automirrored.filled.NavigateNext
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.hapticfeedback.HapticFeedbackType
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
import androidx.compose.ui.input.nestedscroll.NestedScrollSource
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.input.pointer.changedToUpIgnoreConsumed
import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.input.pointer.positionChange
import androidx.compose.ui.layout.onGloballyPositioned
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalHapticFeedback
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.toSize
import androidx.compose.ui.util.fastFirstOrNull
import xyz.quaver.pupil.R
import xyz.quaver.pupil.ui.theme.Blue300
import kotlin.math.abs
import kotlin.math.max
import kotlin.math.min
@Composable
fun OverscrollPager(
prevPage: Int?,
nextPage: Int?,
onPageTurn: (Int) -> Unit,
prevPageTurnIndicatorOffset: Dp = 0.dp,
nextPageTurnIndicatorOffset: Dp = 0.dp,
content: @Composable () -> Unit
) {
val haptic = LocalHapticFeedback.current
val pageTurnIndicatorHeight = LocalDensity.current.run { 64.dp.toPx() }
var overscroll: Float? by remember { mutableStateOf(null) }
var size: Size? by remember { mutableStateOf(null) }
val circleRadius = (size?.width ?: 0f) / 2
val topCircleRadius by animateFloatAsState(if (overscroll?.let { it >= pageTurnIndicatorHeight } == true) circleRadius else 0f, label = "topCircleRadius")
val bottomCircleRadius by animateFloatAsState(if (overscroll?.let { it <= -pageTurnIndicatorHeight } == true) circleRadius else 0f, label = "bottomCircleRadius")
val prevPageTurnIndicatorOffsetPx = LocalDensity.current.run { prevPageTurnIndicatorOffset.toPx() }
val nextPageTurnIndicatorOffsetPx = LocalDensity.current.run { nextPageTurnIndicatorOffset.toPx() }
if (topCircleRadius != 0f || bottomCircleRadius != 0f)
Canvas(modifier = Modifier.fillMaxSize()) {
drawCircle(
Blue300,
center = Offset(this.center.x, prevPageTurnIndicatorOffsetPx),
radius = topCircleRadius
)
drawCircle(
Blue300,
center = Offset(this.center.x, this.size.height-nextPageTurnIndicatorOffsetPx),
radius = bottomCircleRadius
)
}
val isOverscrollOverHeight = overscroll?.let { abs(it) >= pageTurnIndicatorHeight } == true
LaunchedEffect(isOverscrollOverHeight) {
if (isOverscrollOverHeight) haptic.performHapticFeedback(HapticFeedbackType.LongPress)
}
Box(
Modifier
.fillMaxHeight()
.onGloballyPositioned {
size = it.size.toSize()
}
) {
overscroll?.let { overscroll ->
if (overscroll > 0f && prevPage != null) {
Row(
modifier = Modifier
.align(Alignment.TopCenter)
.offset(0.dp, prevPageTurnIndicatorOffset),
verticalAlignment = Alignment.CenterVertically
) {
Icon(
Icons.AutoMirrored.Filled.NavigateBefore,
contentDescription = null,
tint = MaterialTheme.colorScheme.secondary,
modifier = Modifier.size(48.dp)
)
Text(stringResource(R.string.move_to_page, prevPage))
}
}
if (overscroll < 0f && nextPage != null) {
Row(
modifier = Modifier
.align(Alignment.BottomCenter)
.offset(0.dp, -nextPageTurnIndicatorOffset),
verticalAlignment = Alignment.CenterVertically
) {
Text(stringResource(R.string.move_to_page, nextPage))
Icon(
Icons.AutoMirrored.Filled.NavigateNext,
contentDescription = null,
tint = MaterialTheme.colorScheme.secondary,
modifier = Modifier.size(48.dp)
)
}
}
}
Box(
modifier = Modifier
.offset(
0.dp,
overscroll
?.coerceIn(-pageTurnIndicatorHeight, pageTurnIndicatorHeight)
?.let { overscroll -> LocalDensity.current.run { overscroll.toDp() } }
?: 0.dp)
.nestedScroll(object : NestedScrollConnection {
override fun onPreScroll(
available: Offset,
source: NestedScrollSource
): Offset {
val overscrollSnapshot = overscroll
return if (overscrollSnapshot == null || overscrollSnapshot == 0f) {
Offset.Zero
} else {
val newOverscroll =
if (overscrollSnapshot > 0f && available.y < 0f)
max(overscrollSnapshot + available.y, 0f)
else if (overscrollSnapshot < 0f && available.y > 0f)
min(overscrollSnapshot + available.y, 0f)
else
overscrollSnapshot
Offset(0f, newOverscroll - overscrollSnapshot).also {
overscroll = newOverscroll
}
}
}
override fun onPostScroll(
consumed: Offset,
available: Offset,
source: NestedScrollSource
): Offset {
if (
available.y == 0f ||
prevPage == null && available.y > 0f ||
nextPage == null && available.y < 0f
) return Offset.Zero
return overscroll?.let {
overscroll = it + available.y
Offset(0f, available.y)
} ?: Offset.Zero
}
})
.pointerInput(prevPage, nextPage) {
awaitEachGesture {
val down = awaitFirstDown(requireUnconsumed = false)
var pointer = down.id
overscroll = 0f
while (true) {
val event = awaitPointerEvent()
val dragEvent =
event.changes.fastFirstOrNull { it.id == pointer }!!
if (dragEvent.changedToUpIgnoreConsumed()) {
val otherDown = event.changes.fastFirstOrNull { it.pressed }
if (otherDown == null) {
if (dragEvent.positionChange() != Offset.Zero) dragEvent.consume()
overscroll?.let {
if (abs(it) > pageTurnIndicatorHeight) {
if (it > 0 && prevPage != null) onPageTurn(prevPage)
if (it < 0 && nextPage != null) onPageTurn(nextPage)
}
}
overscroll = null
break
} else
pointer = otherDown.id
}
}
}
}
) {
content()
}
}
}
@@ -0,0 +1,793 @@
package xyz.quaver.pupil.ui.composable
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.Spring
import androidx.compose.animation.core.spring
import androidx.compose.foundation.clickable
import androidx.compose.foundation.gestures.animateScrollBy
import androidx.compose.foundation.horizontalScroll
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.AddCircleOutline
import androidx.compose.material.icons.filled.RemoveCircleOutline
import androidx.compose.material3.Card
import androidx.compose.material3.CardColors
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.LocalTextStyle
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.runtime.toMutableStateList
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.focus.onFocusChanged
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.input.key.Key
import androidx.compose.ui.input.key.key
import androidx.compose.ui.input.key.onKeyEvent
import androidx.compose.ui.layout.onGloballyPositioned
import androidx.compose.ui.layout.positionInRoot
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextRange
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.KeyboardCapitalization
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.unit.dp
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import xyz.quaver.pupil.R
import xyz.quaver.pupil.networking.HitomiHttpClient
import xyz.quaver.pupil.networking.SearchQuery
import xyz.quaver.pupil.networking.Suggestion
import xyz.quaver.pupil.networking.validNamespace
import xyz.quaver.pupil.ui.theme.Blue300
import xyz.quaver.pupil.ui.theme.Blue600
import xyz.quaver.pupil.ui.theme.Gray300
import xyz.quaver.pupil.ui.theme.Pink600
import xyz.quaver.pupil.ui.theme.Red300
import xyz.quaver.pupil.ui.theme.Yellow400
private fun SearchQuery.toEditableStateInternal(): EditableSearchQueryState = when (this) {
is SearchQuery.Tag -> EditableSearchQueryState.Tag(namespace, tag)
is SearchQuery.And -> EditableSearchQueryState.And(queries.map { it.toEditableStateInternal() })
is SearchQuery.Or -> EditableSearchQueryState.Or(queries.map { it.toEditableStateInternal() })
is SearchQuery.Not -> EditableSearchQueryState.Not(query.toEditableStateInternal())
}
fun SearchQuery?.toEditableState(): EditableSearchQueryState.Root =
EditableSearchQueryState.Root(this?.toEditableStateInternal())
private fun EditableSearchQueryState.Tag.toSearchQueryInternal(): SearchQuery.Tag? =
if (namespace.value != null || tag.value.isNotBlank()) SearchQuery.Tag(
namespace.value,
tag.value.lowercase().trim()
) else null
private fun EditableSearchQueryState.And.toSearchQueryInternal(): SearchQuery.And? =
queries.mapNotNull { it.toSearchQueryInternal() }
.let { if (it.isNotEmpty()) SearchQuery.And(it) else null }
private fun EditableSearchQueryState.Or.toSearchQueryInternal(): SearchQuery.Or? =
queries.mapNotNull { it.toSearchQueryInternal() }
.let { if (it.isNotEmpty()) SearchQuery.Or(it) else null }
private fun EditableSearchQueryState.Not.toSearchQueryInternal(): SearchQuery.Not? =
query.value?.toSearchQueryInternal()?.let { SearchQuery.Not(it) }
private fun EditableSearchQueryState.toSearchQueryInternal(): SearchQuery? = when (this) {
is EditableSearchQueryState.Tag -> this.toSearchQueryInternal()
is EditableSearchQueryState.And -> this.toSearchQueryInternal()
is EditableSearchQueryState.Or -> this.toSearchQueryInternal()
is EditableSearchQueryState.Not -> this.toSearchQueryInternal()
}
fun EditableSearchQueryState.Root.toSearchQuery(): SearchQuery? =
query.value?.toSearchQueryInternal()
fun coalesceTags(
oldTag: EditableSearchQueryState.Tag?,
newTag: EditableSearchQueryState?,
): EditableSearchQueryState? = if (oldTag != null) {
when (newTag) {
is EditableSearchQueryState.Tag,
is EditableSearchQueryState.Not,
-> EditableSearchQueryState.And(listOf(oldTag, newTag))
is EditableSearchQueryState.And -> newTag.apply { queries.add(oldTag) }
is EditableSearchQueryState.Or -> newTag.apply { queries.add(oldTag) }
null -> oldTag
}
} else newTag
sealed interface EditableSearchQueryState {
class Tag(
namespace: String? = null,
tag: String = "",
expanded: Boolean = false,
) : EditableSearchQueryState {
val namespace = mutableStateOf(namespace)
val tag = mutableStateOf(tag)
val expanded = mutableStateOf(expanded)
}
class And(
queries: List<EditableSearchQueryState> = emptyList(),
) : EditableSearchQueryState {
val queries = queries.toMutableStateList()
}
class Or(
queries: List<EditableSearchQueryState> = emptyList(),
) : EditableSearchQueryState {
val queries = queries.toMutableStateList()
}
class Not(
query: EditableSearchQueryState? = null,
) : EditableSearchQueryState {
val query = mutableStateOf(query)
}
class Root(
query: EditableSearchQueryState? = null,
) {
val query = mutableStateOf(query)
}
}
@Composable
fun TagSuggestionList(
state: EditableSearchQueryState.Tag,
) {
var suggestionList: List<Suggestion>? by remember { mutableStateOf(null) }
var namespace by state.namespace
var tag by state.tag
var expanded by state.expanded
LaunchedEffect(namespace, tag) {
suggestionList = null
val searchQuery = state.toSearchQueryInternal()
suggestionList = if (searchQuery != null) {
HitomiHttpClient.getSuggestionsForQuery(searchQuery)
.getOrDefault(emptyList())
.filterNot { it.tag == SearchQuery.Tag(namespace, tag) }
} else {
emptyList()
}
}
val suggestionListSnapshot = suggestionList
if (suggestionListSnapshot == null) {
Row(
Modifier.padding(16.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalAlignment = Alignment.CenterVertically
) {
CircularProgressIndicator(Modifier.size(24.dp))
Text("Loading")
}
} else if (suggestionListSnapshot.isNotEmpty()) {
Column(
modifier = Modifier.padding(8.dp),
verticalArrangement = Arrangement.spacedBy(4.dp)
) {
suggestionListSnapshot.forEach { suggestion ->
TagChip(
tag = suggestion.tag,
onClick = {
namespace = it.namespace
tag = it.tag
expanded = false
}
)
}
}
}
}
@Composable
fun EditableTagChip(
state: EditableSearchQueryState.Tag,
isFavorite: Boolean = false,
autoFocus: Boolean = true,
requestScrollTo: (Float) -> Unit,
leftIcon: @Composable RowScope.(SearchQuery.Tag) -> Unit = { tag -> TagChipIcon(tag) },
rightIcon: @Composable RowScope.(SearchQuery.Tag) -> Unit = { _ -> Spacer(Modifier.width(16.dp)) },
content: @Composable RowScope.(SearchQuery.Tag) -> Unit = { tag ->
Text(
modifier = Modifier
.weight(1f, fill = false)
.horizontalScroll(rememberScrollState()),
text = tag.tag.ifBlank { stringResource(R.string.search_bar_edit_tag) }
)
},
) {
val coroutineScope = rememberCoroutineScope()
var namespace by state.namespace
var tag by state.tag
var expanded by state.expanded
var wasFocused by remember { mutableStateOf(false) }
var positionY by remember { mutableFloatStateOf(0f) }
LaunchedEffect(expanded) {
if (!expanded) {
wasFocused = false
}
}
val surfaceColor by animateColorAsState(
when {
expanded -> MaterialTheme.colorScheme.surface
isFavorite -> Yellow400
namespace == "male" -> Blue600
namespace == "female" -> Pink600
else -> MaterialTheme.colorScheme.surface
}, label = "tag surface color"
)
val contentColor by animateColorAsState(
when {
expanded -> Color.White
isFavorite -> Color.White
namespace == "male" -> Color.White
namespace == "female" -> Color.White
else -> MaterialTheme.colorScheme.onSurface
}, label = "tag content color"
)
Surface(
modifier = Modifier.onGloballyPositioned {
positionY = it.positionInRoot().y
},
shape = RoundedCornerShape(16.dp),
color = surfaceColor,
shadowElevation = 4.dp
) {
AnimatedContent(targetState = expanded, label = "open tag editor") { targetExpanded ->
if (!targetExpanded) {
CompositionLocalProvider(
LocalContentColor provides contentColor,
LocalTextStyle provides MaterialTheme.typography.bodyMedium
) {
val queryTag = SearchQuery.Tag(namespace, tag)
Row(
modifier = Modifier
.height(32.dp)
.clickable { expanded = true },
verticalAlignment = Alignment.CenterVertically
) {
leftIcon(queryTag)
content(queryTag)
rightIcon(queryTag)
}
}
} else {
Column(
Modifier
.fillMaxWidth()
.padding(top = 8.dp, bottom = 8.dp, end = 8.dp)
) {
Row(
verticalAlignment = Alignment.CenterVertically
) {
IconButton(
onClick = {
expanded = false
}
) {
Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = "close tag editor"
)
}
var selection by remember(tag) { mutableStateOf(TextRange(tag.length)) }
var composition by remember { mutableStateOf<TextRange?>(null) }
val focusRequester = remember { FocusRequester() }
val textFieldValue = remember(tag, selection, composition) {
TextFieldValue(tag, selection, composition)
}
LaunchedEffect(expanded) {
if (autoFocus && expanded) {
focusRequester.requestFocus()
}
}
OutlinedTextField(
value = textFieldValue,
singleLine = true,
keyboardOptions = KeyboardOptions(
capitalization = KeyboardCapitalization.None,
autoCorrectEnabled = false,
imeAction = ImeAction.Done
),
leadingIcon = {
TagChipIcon(SearchQuery.Tag(namespace, tag))
},
modifier = Modifier
.fillMaxWidth()
.onKeyEvent { event ->
if (event.key == Key.Backspace && tag.isEmpty()) {
val newTag = namespace?.dropLast(1) ?: ""
namespace = null
tag = newTag
selection = TextRange(newTag.length)
composition = null
true
} else false
}
.focusRequester(focusRequester)
.onFocusChanged { event ->
if (event.isFocused) {
wasFocused = true
coroutineScope.launch {
delay(300)
requestScrollTo(positionY)
}
} else if (wasFocused) {
expanded = false
}
},
keyboardActions = KeyboardActions(
onDone = {
expanded = false
}
),
onValueChange = { newTextValue ->
val newTag = newTextValue.text
val possibleNamespace = newTag.dropLast(1).lowercase().trim()
tag =
if (namespace == null && newTag.endsWith(':') && possibleNamespace in validNamespace) {
namespace = possibleNamespace
""
} else newTag
selection = newTextValue.selection
composition = newTextValue.composition
}
)
}
TagSuggestionList(state)
}
}
}
}
}
@Composable
fun NewQueryChip(
currentQuery: EditableSearchQueryState?,
onNewQuery: (EditableSearchQueryState) -> Unit,
) {
var opened by remember { mutableStateOf(false) }
@Composable
fun NewQueryRow(
modifier: Modifier = Modifier,
icon: ImageVector = Icons.Default.AddCircleOutline,
text: String,
onClick: () -> Unit,
) {
Row(
modifier = modifier
.height(32.dp)
.clickable(onClick = onClick),
verticalAlignment = Alignment.CenterVertically
) {
Icon(
modifier = Modifier
.padding(8.dp)
.size(16.dp),
imageVector = icon,
contentDescription = text
)
Text(
modifier = Modifier.padding(end = 16.dp),
text = text,
style = MaterialTheme.typography.bodyMedium
)
}
}
Surface(shape = RoundedCornerShape(16.dp), shadowElevation = 4.dp) {
AnimatedContent(targetState = opened, label = "add new query") { targetOpened ->
if (targetOpened) {
Column {
NewQueryRow(
modifier = Modifier.fillMaxWidth(),
icon = Icons.Default.RemoveCircleOutline,
text = stringResource(android.R.string.cancel)
) {
opened = false
}
HorizontalDivider()
if (currentQuery != null && currentQuery !is EditableSearchQueryState.Tag && currentQuery !is EditableSearchQueryState.And) {
NewQueryRow(
modifier = Modifier.fillMaxWidth(),
text = stringResource(R.string.search_add_query_item_tag)
) {
opened = false
onNewQuery(EditableSearchQueryState.Tag(expanded = true))
}
}
if (currentQuery !is EditableSearchQueryState.And) {
HorizontalDivider()
NewQueryRow(modifier = Modifier.fillMaxWidth(), text = "AND") {
opened = false
onNewQuery(EditableSearchQueryState.And())
}
}
if (currentQuery !is EditableSearchQueryState.Or) {
HorizontalDivider()
NewQueryRow(modifier = Modifier.fillMaxWidth(), text = "OR") {
opened = false
onNewQuery(EditableSearchQueryState.Or())
}
}
if (currentQuery !is EditableSearchQueryState.Not || currentQuery.query.value != null) {
HorizontalDivider()
NewQueryRow(modifier = Modifier.fillMaxWidth(), text = "NOT") {
opened = false
onNewQuery(EditableSearchQueryState.Not())
}
}
}
} else {
NewQueryRow(text = stringResource(R.string.search_add_query_item)) {
opened = true
}
}
}
}
}
@Composable
fun QueryEditorQueryView(
state: EditableSearchQueryState,
onQueryRemove: (EditableSearchQueryState) -> Unit,
requestScrollTo: (Float) -> Unit,
requestScrollBy: (Float) -> Unit,
) {
when (state) {
is EditableSearchQueryState.Tag -> {
EditableTagChip(
state,
requestScrollTo = requestScrollTo,
rightIcon = {
Icon(
modifier = Modifier
.padding(8.dp)
.size(16.dp)
.clickable {
onQueryRemove(state)
},
imageVector = Icons.Default.RemoveCircleOutline,
contentDescription = stringResource(R.string.search_remove_query_item_description)
)
}
)
}
is EditableSearchQueryState.Or -> {
Card(
colors = CardColors(
containerColor = Blue300,
contentColor = Color.Black,
disabledContainerColor = Blue300,
disabledContentColor = Color.Black
)
) {
Column(
modifier = Modifier
.fillMaxWidth()
.padding(8.dp),
verticalArrangement = Arrangement.spacedBy(8.dp),
horizontalAlignment = Alignment.Start,
) {
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween
) {
Text(
"OR",
modifier = Modifier.padding(horizontal = 8.dp),
style = MaterialTheme.typography.labelMedium
)
Icon(
modifier = Modifier
.size(16.dp)
.clickable { onQueryRemove(state) },
imageVector = Icons.Default.RemoveCircleOutline,
contentDescription = stringResource(R.string.search_remove_query_item_description)
)
}
state.queries.forEachIndexed { index, subQueryState ->
if (index != 0) {
Text("+", modifier = Modifier.padding(horizontal = 8.dp))
}
QueryEditorQueryView(
subQueryState,
onQueryRemove = { state.queries.remove(it) },
requestScrollTo = requestScrollTo,
requestScrollBy = requestScrollBy
)
}
NewQueryChip(state) { newQueryState ->
state.queries.add(newQueryState)
}
}
}
}
is EditableSearchQueryState.And -> {
Card(
colors = CardColors(
containerColor = Gray300,
contentColor = Color.Black,
disabledContainerColor = Gray300,
disabledContentColor = Color.Black
)
) {
Column(
modifier = Modifier
.fillMaxWidth()
.padding(8.dp),
verticalArrangement = Arrangement.spacedBy(8.dp),
horizontalAlignment = Alignment.Start,
) {
val newSearchQuery = remember { EditableSearchQueryState.Tag() }
var newQueryNamespace by newSearchQuery.namespace
var newQueryTag by newSearchQuery.tag
var newQueryExpanded by newSearchQuery.expanded
val offset = with(LocalDensity.current) { 40.dp.toPx() }
LaunchedEffect(newQueryExpanded) {
if (!newQueryExpanded && (newQueryNamespace != null || newQueryTag.isNotBlank())) {
state.queries.add(
EditableSearchQueryState.Tag(
newQueryNamespace,
newQueryTag
)
)
newQueryNamespace = null
newQueryTag = ""
newQueryExpanded = true
requestScrollBy(offset)
}
}
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween
) {
Text(
"AND",
modifier = Modifier.padding(horizontal = 8.dp),
style = MaterialTheme.typography.labelMedium
)
Icon(
modifier = Modifier
.size(16.dp)
.clickable { onQueryRemove(state) },
imageVector = Icons.Default.RemoveCircleOutline,
contentDescription = stringResource(R.string.search_remove_query_item_description)
)
}
state.queries.forEach { subQuery ->
QueryEditorQueryView(
subQuery,
onQueryRemove = { state.queries.remove(it) },
requestScrollTo = requestScrollTo,
requestScrollBy = requestScrollBy
)
}
EditableTagChip(
newSearchQuery,
requestScrollTo = requestScrollTo,
)
NewQueryChip(state) { newQueryState ->
state.queries.add(newQueryState)
}
}
}
}
is EditableSearchQueryState.Not -> {
var subQueryState by state.query
Card(
colors = CardColors(
containerColor = Red300,
contentColor = Color.Black,
disabledContainerColor = Red300,
disabledContentColor = Color.Black
)
) {
Column(
modifier = Modifier
.fillMaxWidth()
.padding(8.dp),
verticalArrangement = Arrangement.spacedBy(8.dp),
horizontalAlignment = Alignment.Start,
) {
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween
) {
Text(
"-",
modifier = Modifier.padding(horizontal = 8.dp),
style = MaterialTheme.typography.labelMedium
)
Icon(
modifier = Modifier
.size(16.dp)
.clickable { onQueryRemove(state) },
imageVector = Icons.Default.RemoveCircleOutline,
contentDescription = stringResource(R.string.search_remove_query_item_description)
)
}
val subQueryStateSnapshot = subQueryState
if (subQueryStateSnapshot != null) {
QueryEditorQueryView(
subQueryStateSnapshot,
onQueryRemove = { subQueryState = null },
requestScrollTo = requestScrollTo,
requestScrollBy = requestScrollBy,
)
}
if (subQueryStateSnapshot == null) {
NewQueryChip(state) { newQueryState ->
subQueryState = newQueryState
}
}
if (subQueryStateSnapshot is EditableSearchQueryState.Tag) {
NewQueryChip(state) { newQueryState ->
subQueryState = coalesceTags(subQueryStateSnapshot, newQueryState)
}
}
}
}
}
}
}
@Composable
fun QueryEditor(
state: EditableSearchQueryState.Root,
) {
var rootQuery by state.query
val scrollState = rememberScrollState()
var topY by remember { mutableFloatStateOf(0f) }
val scrollOffset = with(LocalDensity.current) { 16.dp.toPx() }
val coroutineScope = rememberCoroutineScope()
Column(
modifier = Modifier
.onGloballyPositioned {
topY = it.positionInRoot().y
}
.verticalScroll(scrollState)
.padding(8.dp),
verticalArrangement = Arrangement.spacedBy(4.dp)
) {
val rootQuerySnapshot = rootQuery
val requestScrollTo: (Float) -> Unit = { target ->
val topYSnapshot = topY
coroutineScope.launch {
scrollState.animateScrollBy(
target - topYSnapshot - scrollOffset,
spring(stiffness = Spring.StiffnessLow)
)
}
}
val requestScrollBy: (Float) -> Unit = { value ->
coroutineScope.launch {
scrollState.animateScrollBy(value)
}
}
if (rootQuerySnapshot != null) {
QueryEditorQueryView(
state = rootQuerySnapshot,
onQueryRemove = { rootQuery = null },
requestScrollTo = requestScrollTo,
requestScrollBy = requestScrollBy
)
}
if (rootQuerySnapshot is EditableSearchQueryState.Tag?) {
val newSearchQuery = remember { EditableSearchQueryState.Tag(expanded = true) }
var newQueryNamespace by newSearchQuery.namespace
var newQueryTag by newSearchQuery.tag
var newQueryExpanded by newSearchQuery.expanded
val offset = with(LocalDensity.current) { 40.dp.toPx() }
LaunchedEffect(newQueryExpanded) {
if (!newQueryExpanded && (newQueryNamespace != null || newQueryTag.isNotBlank())) {
rootQuery = if (rootQuerySnapshot == null) {
EditableSearchQueryState.Tag(newQueryNamespace, newQueryTag)
} else {
EditableSearchQueryState.And(
listOf(
rootQuerySnapshot,
EditableSearchQueryState.Tag(newQueryNamespace, newQueryTag)
)
)
}
newQueryNamespace = null
newQueryTag = ""
newQueryExpanded = true
requestScrollBy(offset)
}
}
EditableTagChip(
newSearchQuery,
requestScrollTo = requestScrollTo
)
NewQueryChip(rootQuerySnapshot) { newState ->
rootQuery = coalesceTags(rootQuerySnapshot, newState)
}
}
}
}
@@ -0,0 +1,703 @@
package xyz.quaver.pupil.ui.composable
import androidx.activity.compose.BackHandler
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.core.AnimationState
import androidx.compose.animation.core.VectorConverter
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.animateTo
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.horizontalScroll
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.absoluteOffset
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.calculateEndPadding
import androidx.compose.foundation.layout.calculateStartPadding
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.safeDrawingPadding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.windowInsetsTopHeight
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.automirrored.filled.Label
import androidx.compose.material.icons.filled.Book
import androidx.compose.material.icons.filled.Brush
import androidx.compose.material.icons.filled.Face
import androidx.compose.material.icons.filled.Female
import androidx.compose.material.icons.filled.Folder
import androidx.compose.material.icons.filled.Group
import androidx.compose.material.icons.filled.Male
import androidx.compose.material.icons.filled.Translate
import androidx.compose.material3.Button
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.FilledTonalButton
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.LocalTextStyle
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
import androidx.compose.ui.input.nestedscroll.NestedScrollSource
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.layout.onGloballyPositioned
import androidx.compose.ui.layout.positionInRoot
import androidx.compose.ui.platform.LocalLayoutDirection
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.dp
import androidx.window.layout.DisplayFeature
import com.google.accompanist.adaptive.HorizontalTwoPaneStrategy
import com.google.accompanist.adaptive.TwoPane
import xyz.quaver.pupil.R
import xyz.quaver.pupil.networking.GalleryInfo
import xyz.quaver.pupil.networking.HitomiHttpClient
import xyz.quaver.pupil.networking.SearchQuery
import xyz.quaver.pupil.ui.theme.Blue600
import xyz.quaver.pupil.ui.theme.Pink600
import xyz.quaver.pupil.ui.theme.Yellow400
import xyz.quaver.pupil.ui.viewmodel.SearchState
import kotlin.math.roundToInt
private val iconMap = mapOf(
"female" to Icons.Default.Female,
"male" to Icons.Default.Male,
"artist" to Icons.Default.Brush,
"group" to Icons.Default.Group,
"character" to Icons.Default.Face,
"series" to Icons.Default.Book,
"type" to Icons.Default.Folder,
"language" to Icons.Default.Translate,
"tag" to Icons.AutoMirrored.Filled.Label,
)
val languageIconMap = mapOf(
"indonesian" to R.drawable.language_indonesian,
"javanese" to R.drawable.language_javanese,
"catalan" to R.drawable.language_catalan,
"cebuano" to R.drawable.language_philippines,
"czech" to R.drawable.language_czech,
"danish" to R.drawable.language_danish,
"german" to R.drawable.language_german,
"estonian" to R.drawable.language_estonian,
"english" to R.drawable.language_english,
"spanish" to R.drawable.language_spanish,
"french" to R.drawable.language_french,
"italian" to R.drawable.language_italian,
"latin" to R.drawable.language_latin,
"hungarian" to R.drawable.language_hungarian,
"dutch" to R.drawable.language_dutch,
"norwegian" to R.drawable.language_norwegian,
"polish" to R.drawable.language_polish,
"portuguese" to R.drawable.language_portuguese,
"romanian" to R.drawable.language_romanian,
"albanian" to R.drawable.language_albanian,
"slovak" to R.drawable.language_slovak,
"finnish" to R.drawable.language_finnish,
"swedish" to R.drawable.language_swedish,
"tagalog" to R.drawable.language_philippines,
"vietnamese" to R.drawable.language_vietnamese,
"turkish" to R.drawable.language_turkish,
"greek" to R.drawable.language_greek,
"mongolian" to R.drawable.language_mongolian,
"russian" to R.drawable.language_russian,
"ukrainian" to R.drawable.language_ukrainian,
"hebrew" to R.drawable.language_hebrew,
"persian" to R.drawable.language_persian,
"thai" to R.drawable.language_thai,
"korean" to R.drawable.language_korean,
"chinese" to R.drawable.language_chinese,
"japanese" to R.drawable.language_japanese,
)
@Composable
fun TagChipIcon(tag: SearchQuery.Tag) {
val icon = iconMap[tag.namespace]
if (icon != null) {
if (tag.namespace == "language" && languageIconMap.contains(tag.tag)) {
Icon(
painter = painterResource(languageIconMap[tag.tag]!!),
contentDescription = "icon",
modifier = Modifier
.padding(4.dp)
.size(24.dp),
tint = Color.Unspecified
)
} else {
Icon(
icon,
contentDescription = "icon",
modifier = Modifier
.padding(4.dp)
.size(24.dp)
)
}
} else {
Spacer(Modifier.width(16.dp))
}
}
@Composable
fun TagChip(
tag: SearchQuery.Tag,
isFavorite: Boolean = false,
enabled: Boolean = true,
onClick: (SearchQuery.Tag) -> Unit = { },
leftIcon: @Composable (SearchQuery.Tag) -> Unit = { TagChipIcon(it) },
rightIcon: @Composable (SearchQuery.Tag) -> Unit = { Spacer(Modifier.width(16.dp)) },
content: @Composable RowScope.(SearchQuery.Tag) -> Unit = {
Text(
it.tag,
modifier = Modifier
.weight(1f, fill = false)
.horizontalScroll(rememberScrollState())
)
},
) {
val surfaceColor = if (isFavorite) Yellow400 else when (tag.namespace) {
"male" -> Blue600
"female" -> Pink600
else -> MaterialTheme.colorScheme.surface
}
val contentColor =
if (surfaceColor == MaterialTheme.colorScheme.surface)
MaterialTheme.colorScheme.onSurface
else
Color.White
val inner = @Composable {
CompositionLocalProvider(
LocalContentColor provides contentColor,
LocalTextStyle provides MaterialTheme.typography.bodyMedium
) {
Row(
verticalAlignment = Alignment.CenterVertically
) {
leftIcon(tag)
content(tag)
rightIcon(tag)
}
}
}
val modifier = Modifier.height(32.dp)
val shape = RoundedCornerShape(16.dp)
if (enabled)
Surface(
modifier = modifier,
shape = shape,
color = surfaceColor,
onClick = { onClick(tag) },
content = inner,
shadowElevation = 4.dp
)
else
Surface(
modifier,
shape = shape,
color = surfaceColor,
content = inner,
shadowElevation = 4.dp
)
}
@Composable
fun QueryView(
query: SearchQuery?,
topLevel: Boolean = true,
) {
val modifier = if (topLevel) {
Modifier
} else {
Modifier.border(
width = 0.5.dp,
color = LocalContentColor.current,
shape = CardDefaults.shape
)
}
when (query) {
null -> {
Text(
modifier = Modifier
.height(60.dp)
.wrapContentHeight()
.padding(horizontal = 16.dp),
text = stringResource(id = R.string.search_hint),
color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.7f)
)
}
is SearchQuery.Tag -> {
TagChip(
query,
enabled = false
)
}
is SearchQuery.Or -> {
Row(
modifier = modifier.padding(vertical = 2.dp, horizontal = 4.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(4.dp),
) {
query.queries.forEachIndexed { index, subQuery ->
if (index != 0) {
Text("+")
}
QueryView(subQuery, topLevel = false)
}
}
}
is SearchQuery.And -> {
Row(
horizontalArrangement = Arrangement.spacedBy(4.dp),
verticalAlignment = Alignment.CenterVertically
) {
query.queries.forEach { subQuery ->
QueryView(subQuery, topLevel = false)
}
}
}
is SearchQuery.Not -> {
Row(
modifier = modifier.padding(vertical = 2.dp, horizontal = 4.dp),
horizontalArrangement = Arrangement.spacedBy(4.dp),
verticalAlignment = Alignment.CenterVertically
) {
Text("-")
QueryView(query.query, topLevel = false)
}
}
}
}
@Composable
fun SearchBar(
contentType: ContentType,
query: SearchQuery?,
onQueryChange: (SearchQuery?) -> Unit,
onSearchBarPositioned: (Int) -> Unit,
topOffset: Int,
onTopOffsetChange: (Int) -> Unit,
content: @Composable () -> Unit,
) {
var focused by remember { mutableStateOf(false) }
val scrimAlpha: Float by animateFloatAsState(
if (focused && contentType == ContentType.SINGLE_PANE) 0.3f else 0f,
label = "scrim alpha"
)
val interactionSource = remember { MutableInteractionSource() }
val state = remember(query) { query.toEditableState() }
LaunchedEffect(focused) {
if (!focused) {
onQueryChange(state.toSearchQuery())
} else {
AnimationState(Int.VectorConverter, topOffset).animateTo(0) { onTopOffsetChange(value) }
}
}
if (focused) {
BackHandler {
focused = false
}
}
BoxWithConstraints(
modifier = Modifier
.fillMaxSize()
.clickable(
interactionSource = interactionSource,
indication = null
) {
focused = false
}
) {
val height: Dp by animateDpAsState(
if (focused) maxHeight else 60.dp,
label = "searchbar height"
)
val cardShape = RoundedCornerShape(30.dp)
content()
Box(
Modifier
.fillMaxSize()
.background(Color.Black.copy(alpha = scrimAlpha))
)
Card(
modifier = Modifier
.safeDrawingPadding()
.padding(16.dp)
.fillMaxWidth()
.height(height)
.clickable(
interactionSource = interactionSource,
indication = null
) {
focused = true
}
.onGloballyPositioned {
onSearchBarPositioned(it.positionInRoot().y.roundToInt() + it.size.height)
}
.absoluteOffset { IntOffset(0, topOffset) },
shape = cardShape,
elevation = CardDefaults.cardElevation(6.dp)
) {
Box {
androidx.compose.animation.AnimatedVisibility(
!focused,
enter = fadeIn(),
exit = fadeOut()
) {
Row(
modifier = Modifier
.heightIn(min = 60.dp)
.horizontalScroll(rememberScrollState()),
verticalAlignment = Alignment.CenterVertically
) {
Box(Modifier.size(8.dp))
QueryView(query)
Box(Modifier.size(8.dp))
}
}
androidx.compose.animation.AnimatedVisibility(
focused,
enter = fadeIn(),
exit = fadeOut()
) {
Column(
Modifier
.fillMaxSize()
.padding(top = 8.dp, start = 8.dp, end = 8.dp)
) {
IconButton(
onClick = {
focused = false
}
) {
Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = "close search bar"
)
}
QueryEditor(state = state)
}
}
}
}
}
}
@Composable
fun GalleryList(
contentType: ContentType,
galleries: List<GalleryInfo>,
query: SearchQuery?,
currentPage: Int,
maxPage: Int,
loading: Boolean = false,
error: Boolean = false,
onPageChange: (Int) -> Unit,
onQueryChange: (SearchQuery?) -> Unit = {},
openGalleryDetails: (GalleryInfo) -> Unit,
) {
val listState = rememberLazyListState()
var topOffset by remember { mutableIntStateOf(0) }
var searchBarPosition by remember { mutableIntStateOf(0) }
val listModifier = Modifier.nestedScroll(object : NestedScrollConnection {
override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset {
topOffset = (topOffset + available.y.roundToInt()).coerceIn(-searchBarPosition, 0)
return Offset.Zero
}
})
LaunchedEffect(galleries) {
listState.animateScrollToItem(0)
topOffset = 0
}
SearchBar(
contentType = contentType,
query = query,
onQueryChange = onQueryChange,
onSearchBarPositioned = { searchBarPosition = it },
topOffset = topOffset,
onTopOffsetChange = { topOffset = it },
) {
AnimatedVisibility(loading, enter = fadeIn(), exit = fadeOut()) {
Box(Modifier.fillMaxSize()) {
CircularProgressIndicator(Modifier.align(Alignment.Center))
}
}
AnimatedVisibility(error, enter = fadeIn(), exit = fadeOut()) {
Box(Modifier.fillMaxSize()) {
Column(
Modifier.align(Alignment.Center),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(16.dp)
) {
Text(
"(´∇`)",
style = MaterialTheme.typography.headlineMedium,
color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.5f)
)
Text("No sources found!\nLet's go download one.", textAlign = TextAlign.Center)
}
}
}
AnimatedVisibility(!loading && !error, enter = fadeIn(), exit = fadeOut()) {
OverscrollPager(
prevPage = if (currentPage != 0) currentPage else null,
nextPage = if (currentPage < maxPage) currentPage + 2 else null,
onPageTurn = { onPageChange(it - 1) }
) {
LazyColumn(
modifier = listModifier,
contentPadding = WindowInsets.systemBars.asPaddingValues()
.let { systemBarPaddingValues ->
val layoutDirection = LocalLayoutDirection.current
PaddingValues(
top = systemBarPaddingValues.calculateTopPadding() + 96.dp,
bottom = systemBarPaddingValues.calculateBottomPadding(),
start = systemBarPaddingValues.calculateStartPadding(layoutDirection),
end = systemBarPaddingValues.calculateEndPadding(layoutDirection),
)
},
verticalArrangement = Arrangement.spacedBy(8.dp),
state = listState
) {
items(galleries, key = { it.id }) { galleryInfo ->
DetailedGalleryInfo(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 4.dp)
.clickable { openGalleryDetails(galleryInfo) },
galleryInfo = galleryInfo
)
}
}
}
}
}
}
@Composable
fun DetailScreen(
galleryInfo: GalleryInfo,
closeGalleryDetails: () -> Unit = { },
openGallery: (GalleryInfo) -> Unit = { },
) {
var thumbnailUrl by remember { mutableStateOf<String?>(null) }
LaunchedEffect(galleryInfo) {
thumbnailUrl = galleryInfo.files.firstOrNull()?.let {
HitomiHttpClient.getImageURL(it, true).firstOrNull()
} ?: ""
}
Column(
Modifier
.padding(horizontal = 8.dp)
.verticalScroll(rememberScrollState()),
verticalArrangement = Arrangement.spacedBy(16.dp)
) {
Spacer(Modifier.windowInsetsTopHeight(WindowInsets.systemBars))
IconButton(onClick = closeGalleryDetails) {
Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = "Close Detail")
}
DetailedGalleryInfoHeader(galleryInfo, thumbnailUrl)
Row(Modifier.fillMaxWidth()) {
FilledTonalButton(
modifier = Modifier
.weight(1f)
.padding(horizontal = 4.dp),
onClick = { /*TODO*/ }
) {
Text(stringResource(R.string.download))
}
Button(
modifier = Modifier
.weight(1f)
.padding(horizontal = 4.dp),
onClick = { openGallery(galleryInfo) }
) {
Text("Open")
}
}
GalleryTypeIndicator(galleryInfo.type)
if (galleryInfo.series?.isNotEmpty() == true) {
TagGroup(galleryInfo.series.map { it.toTag() })
}
if (galleryInfo.characters?.isNotEmpty() == true) {
TagGroup(galleryInfo.characters.map { it.toTag() })
}
if (galleryInfo.tags?.isNotEmpty() == true) {
TagGroup(galleryInfo.tags.map { it.toTag() })
}
}
}
@Composable
fun SearchScreen(
contentType: ContentType,
displayFeatures: List<DisplayFeature>,
uiState: SearchState,
openGalleryDetails: (GalleryInfo) -> Unit,
closeGalleryDetails: () -> Unit,
onQueryChange: (SearchQuery?) -> Unit,
loadSearchResult: (IntRange) -> Unit,
openGallery: (GalleryInfo) -> Unit,
) {
val itemsPerPage by remember { mutableIntStateOf(20) }
val pageToRange: (Int) -> IntRange = remember(itemsPerPage) {
{ page ->
page * itemsPerPage..<(page + 1) * itemsPerPage
}
}
val currentPage = remember(uiState) {
if (uiState.currentRange != IntRange.EMPTY) {
uiState.currentRange.first / itemsPerPage
} else 0
}
val maxPage = remember(itemsPerPage, uiState) {
if (uiState.galleryCount != null) {
uiState.galleryCount / itemsPerPage + if (uiState.galleryCount % itemsPerPage != 0) 1 else 0
} else 0
}
val loadResult: (Int) -> Unit = remember(loadSearchResult) {
{ page ->
loadSearchResult(pageToRange(page))
}
}
LaunchedEffect(uiState.query) { loadSearchResult(pageToRange(currentPage)) }
LaunchedEffect(contentType) {
if (contentType == ContentType.SINGLE_PANE && !uiState.isDetailOnlyOpen) {
closeGalleryDetails()
}
}
if (contentType == ContentType.SINGLE_PANE && uiState.isDetailOnlyOpen) {
BackHandler {
closeGalleryDetails()
}
}
if (contentType == ContentType.DUAL_PANE) {
TwoPane(
first = {
GalleryList(
contentType = contentType,
galleries = uiState.galleries,
query = uiState.query,
currentPage = currentPage,
maxPage = maxPage,
loading = uiState.loading,
error = uiState.error,
onQueryChange = onQueryChange,
onPageChange = loadResult,
openGalleryDetails = openGalleryDetails
)
},
second = {
},
strategy = HorizontalTwoPaneStrategy(splitFraction = 0.5f, gapWidth = 16.dp),
displayFeatures = displayFeatures
)
} else {
val detailGallery = uiState.openedGallery
AnimatedVisibility(!uiState.isDetailOnlyOpen || detailGallery == null) {
GalleryList(
contentType = contentType,
galleries = uiState.galleries,
query = uiState.query,
currentPage = currentPage,
maxPage = maxPage,
loading = uiState.loading,
error = uiState.error,
onQueryChange = onQueryChange,
onPageChange = loadResult,
openGalleryDetails = openGalleryDetails
)
}
AnimatedVisibility(uiState.isDetailOnlyOpen && detailGallery != null) {
if (detailGallery != null) {
DetailScreen(
galleryInfo = detailGallery,
closeGalleryDetails = closeGalleryDetails,
openGallery = openGallery
)
}
}
}
}
@@ -0,0 +1,148 @@
package xyz.quaver.pupil.ui.theme
import androidx.compose.ui.graphics.Color
val md_theme_light_primary = Color(0xFF006688)
val md_theme_light_onPrimary = Color(0xFFFFFFFF)
val md_theme_light_primaryContainer = Color(0xFFC2E8FF)
val md_theme_light_onPrimaryContainer = Color(0xFF001E2B)
val md_theme_light_secondary = Color(0xFF4E616D)
val md_theme_light_onSecondary = Color(0xFFFFFFFF)
val md_theme_light_secondaryContainer = Color(0xFFD1E5F3)
val md_theme_light_onSecondaryContainer = Color(0xFF091E28)
val md_theme_light_tertiary = Color(0xFF5F5A7D)
val md_theme_light_onTertiary = Color(0xFFFFFFFF)
val md_theme_light_tertiaryContainer = Color(0xFFE5DEFF)
val md_theme_light_onTertiaryContainer = Color(0xFF1C1736)
val md_theme_light_error = Color(0xFFBA1A1A)
val md_theme_light_errorContainer = Color(0xFFFFDAD6)
val md_theme_light_onError = Color(0xFFFFFFFF)
val md_theme_light_onErrorContainer = Color(0xFF410002)
val md_theme_light_background = Color(0xFFFBFCFE)
val md_theme_light_onBackground = Color(0xFF191C1E)
val md_theme_light_surface = Color(0xFFFBFCFE)
val md_theme_light_onSurface = Color(0xFF191C1E)
val md_theme_light_surfaceVariant = Color(0xFFDCE3E9)
val md_theme_light_onSurfaceVariant = Color(0xFF40484D)
val md_theme_light_outline = Color(0xFF71787D)
val md_theme_light_inverseOnSurface = Color(0xFFF0F1F3)
val md_theme_light_inverseSurface = Color(0xFF2E3133)
val md_theme_light_inversePrimary = Color(0xFF75D1FF)
val md_theme_light_shadow = Color(0xFF000000)
val md_theme_light_surfaceTint = Color(0xFF006688)
val md_theme_light_outlineVariant = Color(0xFFC0C7CD)
val md_theme_light_scrim = Color(0xFF000000)
val md_theme_dark_primary = Color(0xFF75D1FF)
val md_theme_dark_onPrimary = Color(0xFF003548)
val md_theme_dark_primaryContainer = Color(0xFF004D67)
val md_theme_dark_onPrimaryContainer = Color(0xFFC2E8FF)
val md_theme_dark_secondary = Color(0xFFB5C9D7)
val md_theme_dark_onSecondary = Color(0xFF20333D)
val md_theme_dark_secondaryContainer = Color(0xFF364954)
val md_theme_dark_onSecondaryContainer = Color(0xFFD1E5F3)
val md_theme_dark_tertiary = Color(0xFFC9C2EA)
val md_theme_dark_onTertiary = Color(0xFF312C4C)
val md_theme_dark_tertiaryContainer = Color(0xFF474364)
val md_theme_dark_onTertiaryContainer = Color(0xFFE5DEFF)
val md_theme_dark_error = Color(0xFFFFB4AB)
val md_theme_dark_errorContainer = Color(0xFF93000A)
val md_theme_dark_onError = Color(0xFF690005)
val md_theme_dark_onErrorContainer = Color(0xFFFFDAD6)
val md_theme_dark_background = Color(0xFF191C1E)
val md_theme_dark_onBackground = Color(0xFFE1E2E5)
val md_theme_dark_surface = Color(0xFF191C1E)
val md_theme_dark_onSurface = Color(0xFFE1E2E5)
val md_theme_dark_surfaceVariant = Color(0xFF40484D)
val md_theme_dark_onSurfaceVariant = Color(0xFFC0C7CD)
val md_theme_dark_outline = Color(0xFF8A9297)
val md_theme_dark_inverseOnSurface = Color(0xFF191C1E)
val md_theme_dark_inverseSurface = Color(0xFFE1E2E5)
val md_theme_dark_inversePrimary = Color(0xFF006688)
val md_theme_dark_shadow = Color(0xFF000000)
val md_theme_dark_surfaceTint = Color(0xFF75D1FF)
val md_theme_dark_outlineVariant = Color(0xFF40484D)
val md_theme_dark_scrim = Color(0xFF000000)
val seed = Color(0xFF4FC3F7)
val Gray50 = Color(0xFFF9FAFB)
val Gray100 = Color(0xFFF3F4F6)
val Gray200 = Color(0xFFE5E7EB)
val Gray300 = Color(0xFFD1D5DB)
val Gray400 = Color(0xFF9CA3AF)
val Gray500 = Color(0xFF6B7280)
val Gray600 = Color(0xFF4B5563)
val Gray700 = Color(0xFF374151)
val Gray800 = Color(0xFF1F2937)
val Gray900 = Color(0xFF111827)
val Red50 = Color(0xFFFEF2F2)
val Red100 = Color(0xFFFEE2E2)
val Red200 = Color(0xFFFECACA)
val Red300 = Color(0xFFFCA5A5)
val Red400 = Color(0xFFF87171)
val Red500 = Color(0xFFEF4444)
val Red600 = Color(0xFFDC2626)
val Red700 = Color(0xFFB91C1C)
val Red800 = Color(0xFF991B1B)
val Red900 = Color(0xFF7F1D1D)
val Yellow50 = Color(0xFFFFFBEB)
val Yellow100 = Color(0xFFFEF3C7)
val Yellow200 = Color(0xFFFDE68A)
val Yellow300 = Color(0xFFFCD34D)
val Yellow400 = Color(0xFFFBBF24)
val Yellow500 = Color(0xFFF59E0B)
val Yellow600 = Color(0xFFD97706)
val Yellow700 = Color(0xFFB45309)
val Yellow800 = Color(0xFF92400E)
val Yellow900 = Color(0xFF78350F)
val Green50 = Color(0xFFECFDF5)
val Green100 = Color(0xFFD1FAE5)
val Green200 = Color(0xFFA7F3D0)
val Green300 = Color(0xFF6EE7B7)
val Green400 = Color(0xFF34D399)
val Green500 = Color(0xFF10B981)
val Green600 = Color(0xFF059669)
val Green700 = Color(0xFF047857)
val Green800 = Color(0xFF065F46)
val Green900 = Color(0xFF064E3B)
val Blue50 = Color(0xFFEFF6FF)
val Blue100 = Color(0xFFDBEAFE)
val Blue200 = Color(0xFFBFDBFE)
val Blue300 = Color(0xFF93C5FD)
val Blue400 = Color(0xFF60A5FA)
val Blue500 = Color(0xFF3B82F6)
val Blue600 = Color(0xFF2563EB)
val Blue700 = Color(0xFF1D4ED8)
val Blue800 = Color(0xFF1E40AF)
val Blue900 = Color(0xFF1E3A8A)
val Indigo50 = Color(0xFFEEF2FF)
val Indigo100 = Color(0xFFE0E7FF)
val Indigo200 = Color(0xFFC7D2FE)
val Indigo300 = Color(0xFFA5B4FC)
val Indigo400 = Color(0xFF818CF8)
val Indigo500 = Color(0xFF6366F1)
val Indigo600 = Color(0xFF4F46E5)
val Indigo700 = Color(0xFF4338CA)
val Indigo800 = Color(0xFF3730A3)
val Indigo900 = Color(0xFF312E81)
val Purple50 = Color(0xFFF5F3FF)
val Purple100 = Color(0xFFEDE9FE)
val Purple200 = Color(0xFFDDD6FE)
val Purple300 = Color(0xFFC4B5FD)
val Purple400 = Color(0xFFA78BFA)
val Purple500 = Color(0xFF8B5CF6)
val Purple600 = Color(0xFF7C3AED)
val Purple700 = Color(0xFF6D28D9)
val Purple800 = Color(0xFF5B21B6)
val Purple900 = Color(0xFF4C1D95)
val Pink50 = Color(0xFFFDF2F8)
val Pink100 = Color(0xFFFCE7F3)
val Pink200 = Color(0xFFFBCFE8)
val Pink300 = Color(0xFFF9A8D4)
val Pink400 = Color(0xFFF472B6)
val Pink500 = Color(0xFFEC4899)
val Pink600 = Color(0xFFDB2777)
val Pink700 = Color(0xFFBE185D)
val Pink800 = Color(0xFF9D174D)
val Pink900 = Color(0xFF831843)
@@ -0,0 +1,90 @@
package xyz.quaver.pupil.ui.theme
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.runtime.Composable
private val LightColors = lightColorScheme(
primary = md_theme_light_primary,
onPrimary = md_theme_light_onPrimary,
primaryContainer = md_theme_light_primaryContainer,
onPrimaryContainer = md_theme_light_onPrimaryContainer,
secondary = md_theme_light_secondary,
onSecondary = md_theme_light_onSecondary,
secondaryContainer = md_theme_light_secondaryContainer,
onSecondaryContainer = md_theme_light_onSecondaryContainer,
tertiary = md_theme_light_tertiary,
onTertiary = md_theme_light_onTertiary,
tertiaryContainer = md_theme_light_tertiaryContainer,
onTertiaryContainer = md_theme_light_onTertiaryContainer,
error = md_theme_light_error,
errorContainer = md_theme_light_errorContainer,
onError = md_theme_light_onError,
onErrorContainer = md_theme_light_onErrorContainer,
background = md_theme_light_background,
onBackground = md_theme_light_onBackground,
surface = md_theme_light_surface,
onSurface = md_theme_light_onSurface,
surfaceVariant = md_theme_light_surfaceVariant,
onSurfaceVariant = md_theme_light_onSurfaceVariant,
outline = md_theme_light_outline,
inverseOnSurface = md_theme_light_inverseOnSurface,
inverseSurface = md_theme_light_inverseSurface,
inversePrimary = md_theme_light_inversePrimary,
surfaceTint = md_theme_light_surfaceTint,
outlineVariant = md_theme_light_outlineVariant,
scrim = md_theme_light_scrim,
)
private val DarkColors = darkColorScheme(
primary = md_theme_dark_primary,
onPrimary = md_theme_dark_onPrimary,
primaryContainer = md_theme_dark_primaryContainer,
onPrimaryContainer = md_theme_dark_onPrimaryContainer,
secondary = md_theme_dark_secondary,
onSecondary = md_theme_dark_onSecondary,
secondaryContainer = md_theme_dark_secondaryContainer,
onSecondaryContainer = md_theme_dark_onSecondaryContainer,
tertiary = md_theme_dark_tertiary,
onTertiary = md_theme_dark_onTertiary,
tertiaryContainer = md_theme_dark_tertiaryContainer,
onTertiaryContainer = md_theme_dark_onTertiaryContainer,
error = md_theme_dark_error,
errorContainer = md_theme_dark_errorContainer,
onError = md_theme_dark_onError,
onErrorContainer = md_theme_dark_onErrorContainer,
background = md_theme_dark_background,
onBackground = md_theme_dark_onBackground,
surface = md_theme_dark_surface,
onSurface = md_theme_dark_onSurface,
surfaceVariant = md_theme_dark_surfaceVariant,
onSurfaceVariant = md_theme_dark_onSurfaceVariant,
outline = md_theme_dark_outline,
inverseOnSurface = md_theme_dark_inverseOnSurface,
inverseSurface = md_theme_dark_inverseSurface,
inversePrimary = md_theme_dark_inversePrimary,
surfaceTint = md_theme_dark_surfaceTint,
outlineVariant = md_theme_dark_outlineVariant,
scrim = md_theme_dark_scrim,
)
@Composable
fun AppTheme(
useDarkTheme: Boolean = isSystemInDarkTheme(),
content: @Composable() () -> Unit
) {
val colors = if (!useDarkTheme) {
LightColors
} else {
DarkColors
}
MaterialTheme(
colorScheme = colors,
content = content
)
}
@@ -0,0 +1,86 @@
package xyz.quaver.pupil.ui.viewmodel
import android.util.Log
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
import xyz.quaver.pupil.networking.GalleryInfo
import xyz.quaver.pupil.networking.GallerySearchSource
import xyz.quaver.pupil.networking.SearchQuery
import kotlin.math.max
import kotlin.math.min
class MainViewModel : ViewModel() {
private val _uiState = MutableStateFlow(SearchState())
val searchState: StateFlow<SearchState> = _uiState
private var searchSource: GallerySearchSource = GallerySearchSource(null)
private var job: Job? = null
fun openGalleryDetails(galleryInfo: GalleryInfo) {
_uiState.value = _uiState.value.copy(
openedGallery = galleryInfo,
isDetailOnlyOpen = true
)
}
fun closeGalleryDetails() {
_uiState.value = _uiState.value.copy(
isDetailOnlyOpen = false
)
}
fun onQueryChange(query: SearchQuery?) {
_uiState.value = _uiState.value.copy(
query = query,
galleryCount = null,
currentRange = IntRange.EMPTY
)
searchSource = GallerySearchSource(query)
}
fun loadSearchResult(range: IntRange) {
Thread.dumpStack()
job?.cancel()
job = viewModelScope.launch {
val sanitizedRange = max(range.first, 0) .. min(range.last, searchState.value.galleryCount ?: Int.MAX_VALUE)
_uiState.value = _uiState.value.copy(
loading = true,
error = false,
currentRange = sanitizedRange
)
var error = false
val (galleries, galleryCount) = searchSource.load(range).getOrElse {
error = true
it.printStackTrace()
emptyList<GalleryInfo>() to 0
}
_uiState.value = _uiState.value.copy(
galleries = galleries,
galleryCount = galleryCount,
error = error,
loading = false
)
}
}
fun navigateToDetail() {
}
}
data class SearchState(
val query: SearchQuery? = null,
val galleries: List<GalleryInfo> = emptyList(),
val loading: Boolean = false,
val error: Boolean = false,
val galleryCount: Int? = null,
val currentRange: IntRange = IntRange.EMPTY,
val openedGallery: GalleryInfo? = null,
val isDetailOnlyOpen: Boolean = false
)
+12
View File
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="900dp"
android:height="900dp"
android:viewportWidth="900"
android:viewportHeight="900">
<path
android:pathData="M450,450m-450,0a450,450 0,1 1,900 0a450,450 0,1 1,-900 0"
android:fillColor="#4EC1F5"/>
<path
android:pathData="M450,450m-175,0a175,175 0,1 1,350 0a175,175 0,1 1,-350 0"
android:fillColor="#1D1D1D"/>
</vector>
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h512v512H0z"
android:fillColor="#d80027"/>
<path
android:pathData="M400.7,190H308a33.3,33.3 0,0 0,-24.2 -56.4,33.3 33.3,0 0,0 -27.8,14.9 33.4,33.4 0,1 0,-52 41.5h-92.7a45.8,45.8 0,0 0,46 44.5h-1.5c0,24.6 20,44.6 44.5,44.6 0,8 2.1,15.4 5.8,21.8l-37,37 28.4,28.3 40.2,-40.2a30.5,30.5 0,0 0,4.9 1.4l-24.3,54.8L256,423l37.7,-40.8 -24.3,-54.8a30.4,30.4 0,0 0,4.9 -1.4l40.2,40.2 28.3,-28.3 -37,-37a44.2,44.2 0,0 0,5.9 -21.8c24.5,0 44.5,-20 44.5,-44.6h-1.5c24.6,0 46,-19.9 46,-44.5z"
android:fillColor="#333"/>
</group>
</vector>
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0v57l32,29 -32,28v57l32,29 -32,28v57l32,28 -32,28v57l32,29 -32,28v57h512v-57l-32,-28 32,-29v-57l-32,-28 32,-28v-57l-32,-28 32,-29v-57l-32,-28 32,-29V0H0z"
android:fillColor="#ffda44"/>
<path
android:pathData="M0,57h512v57L0,114ZM0,171h512v57L0,228ZM0,285h512v56L0,341ZM0,398h512v57L0,455Z"
android:fillColor="#d80027"/>
</group>
</vector>
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h512v512H0z"
android:fillColor="#d80027"/>
<path
android:pathData="m140.1,155.8 l22.1,68h71.5l-57.8,42.1 22.1,68 -57.9,-42 -57.9,42 22.2,-68 -57.9,-42.1L118,223.8zM303.5,396.5 L286.6,375.7 261.6,385.4 276.1,362.9 259.2,342 285.1,348.9 299.7,326.4 301.1,353.2 327.1,360.1 302,369.7zM337.1,335.5 L345.1,309.9 323.2,294.4 350,294 357.9,268.4 366.6,293.8 393.4,293.5 371.9,309.5 380.5,334.9 358.6,319.4zM382.4,187.9L370.6,212l19.2,18.7 -26.5,-3.8 -11.8,24 -4.6,-26.4 -26.6,-3.8 23.8,-12.5 -4.6,-26.5 19.2,18.7zM304.2,114.9 L302.2,141.6 327.1,151.7 301,158.1 299.1,184.9 285,162.1 258.9,168.5 276.2,148 262,125.3 286.9,135.4z"
android:fillColor="#ffda44"/>
</group>
</vector>
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h512v256l-265,45.2z"
android:fillColor="#eee"/>
<path
android:pathData="M210,256h302v256H0z"
android:fillColor="#d80027"/>
<path
android:pathData="M0,0v512l256,-256L0,0z"
android:fillColor="#0052b4"/>
</group>
</vector>
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h133.6l32.7,20.3 34,-20.3H512v222.6L491.4,256l20.6,33.4V512H200.3l-31.7,-20.4 -35,20.4H0V289.4l29.4,-33L0,222.7z"
android:fillColor="#d80027"/>
<path
android:pathData="M133.6,0v222.6H0v66.8h133.6V512h66.7V289.4H512v-66.8H200.3V0h-66.7z"
android:fillColor="#eee"/>
</group>
</vector>
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="m0,167 l253.8,-19.3L512,167v178l-254.9,32.3L0,345z"
android:fillColor="#eee"/>
<path
android:pathData="M0,0h512v167H0z"
android:fillColor="#a2001d"/>
<path
android:pathData="M0,345h512v167H0z"
android:fillColor="#0052b4"/>
</group>
</vector>
@@ -0,0 +1,22 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M256,0 L0,256v64l32,32 -32,32v128l22,-8 23,8h23l54,-32 54,32h32l48,-32 48,32h32l54,-32 54,32h68l-8,-22 8,-23v-23l-32,-54 32,-54v-32l-32,-48 32,-48v-32l-32,-54 32,-54V0H256z"
android:fillColor="#eee"/>
<path
android:pathData="M224,64v64h160l64,-64zM224,192 L256,256 208,304v208h96L304,304h208v-96L304,208l16,-16zM0,320v64h128l-64,64L0,448v64h45l131,-131v-45l16,-16zM336,336 L512,512v-45L381,336Z"
android:fillColor="#d80027"/>
<path
android:pathData="M0,0v256h256L256,0L0,0zM512,68L404,176h108L512,68zM404,336l108,108L512,336L404,336zM176,404L68,512h108L176,404zM336,404v108h108L336,404z"
android:fillColor="#0052b4"/>
<path
android:pathData="m187,243 l57,-41h-70l57,41 -22,-67zM106,243 L163,202L93,202l57,41 -22,-67zM25,243 L82,202L12,202l57,41 -22,-67zM187,162 L244,121h-70l57,41 -22,-67zM106,162 L163,121L93,121l57,41 -22,-67zM25,162 L82,121L12,121l57,41 -22,-67ZM187,80 L244,39h-70l57,41 -22,-67zM106,80 L163,39L93,39l57,41 -22,-67ZM25,80 L82,39L12,39l57,41 -22,-67Z"
android:fillColor="#eee"/>
</group>
</vector>
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="m0,167 l254.6,-36.6L512,166.9v178l-254.6,36.4L0,344.9z"
android:fillColor="#333"/>
<path
android:pathData="M0,0h512v166.9H0z"
android:fillColor="#0052b4"/>
<path
android:pathData="M0,344.9h512V512H0z"
android:fillColor="#eee"/>
</group>
</vector>
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h133.6l35.3,16.7L200.3,0H512v222.6l-22.6,31.7 22.6,35.1V512H200.3l-32,-19.8 -34.7,19.8H0V289.4l22.1,-33.3L0,222.6z"
android:fillColor="#eee"/>
<path
android:pathData="M133.6,0v222.6H0v66.8h133.6V512h66.7V289.4H512v-66.8H200.3V0h-66.7z"
android:fillColor="#0052b4"/>
</group>
</vector>
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M167,0h178l25.9,252.3L345,512H167l-29.8,-253.4z"
android:fillColor="#eee"/>
<path
android:pathData="M0,0h167v512H0z"
android:fillColor="#0052b4"/>
<path
android:pathData="M345,0h167v512H345z"
android:fillColor="#d80027"/>
</group>
</vector>
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="m0,345 l256.7,-25.5L512,345v167H0z"
android:fillColor="#ffda44"/>
<path
android:pathData="m0,167 l255,-23 257,23v178H0z"
android:fillColor="#d80027"/>
<path
android:pathData="M0,0h512v167H0z"
android:fillColor="#333"/>
</group>
</vector>
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h99l29,32 28,-32h356v57l-32,28 32,29v57l-32,28 32,29v57l-32,28 32,28v57l-32,29 32,28v57H0v-57l32,-28 -32,-29v-56l32,-29 -32,-28V171l32,-29 -32,-28Z"
android:fillColor="#0052b4"/>
<path
android:pathData="M99,0v114L0,114v57h99v114L0,285v57h512v-57L156,285L156,171h100v-57L156,114L156,0ZM256,57v57h256L512,57ZM256,171v57h256v-57ZM0,398v57h512v-57z"
android:fillColor="#eee"/>
</group>
</vector>
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h512v55.7l-25,32.7 25,34v267.2l-26,36 26,30.7V512H0v-55.7l24.8,-34.1L0,389.6V122.4l27.2,-33.2L0,55.7z"
android:fillColor="#eee"/>
<path
android:pathData="M0,55.7v66.7h512L512,55.7zM0,389.6v66.7h512v-66.7zM352.4,200.3L288,200.3l-32,-55.6 -32.1,55.6h-64.3l32.1,55.7 -32,55.7h64.2l32.1,55.6 32.1,-55.6h64.3L320.3,256l32,-55.7zM295.4,256 L275.7,290.2h-39.4L216.5,256l19.8,-34.2h39.4l19.8,34.2zM256,187.6l7.3,12.7h-14.6zM196.8,221.8h14.7l-7.4,12.7zM196.8,290.2 L204.1,277.5 211.5,290.2zM256,324.4 L248.7,311.7h14.6zM315.2,290.2h-14.7l7.4,-12.7zM300.5,221.8h14.7l-7.3,12.7z"
android:fillColor="#0052b4"/>
</group>
</vector>
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="m0,167 l253.8,-19.3L512,167v178l-254.9,32.3L0,345z"
android:fillColor="#eee"/>
<path
android:pathData="M0,0h512v167H0z"
android:fillColor="#d80027"/>
<path
android:pathData="M0,345h512v167H0z"
android:fillColor="#6da544"/>
</group>
</vector>
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="m0,256 l249.6,-41.3L512,256v256H0z"
android:fillColor="#eee"/>
<path
android:pathData="M0,0h512v256H0z"
android:fillColor="#a2001d"/>
</group>
</vector>
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M167,0h178l25.9,252.3L345,512H167l-29.8,-253.4z"
android:fillColor="#eee"/>
<path
android:pathData="M0,0h167v512H0z"
android:fillColor="#6da544"/>
<path
android:pathData="M345,0h167v512H345z"
android:fillColor="#d80027"/>
</group>
</vector>
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h512v512H0z"
android:fillColor="#eee"/>
<path
android:pathData="M256,256m-111.3,0a111.3,111.3 0,1 1,222.6 0a111.3,111.3 0,1 1,-222.6 0"
android:fillColor="#d80027"/>
</group>
</vector>
@@ -0,0 +1,43 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h512v512H0Z"
android:fillColor="#ffda44"/>
<path
android:pathData="m256,114 l-6,2 -95,78c-4,3 -4,9 -1,13l102,-33 102,33c3,-4 3,-10 -1,-13l-95,-78 -6,-2z"
android:fillColor="#d80027"/>
<path
android:pathData="M278,231h-1zM235,231z"
android:fillColor="#eee"/>
<path
android:pathData="m256,134 l-99,72 6,22 51,-32 42,25 42,-25 51,32 6,-22z"
android:fillColor="#6da544"/>
<path
android:pathData="m256,191 l-28,60 -9,-21 -10,21 -7,-16 -10,21 -7,-16 -13,27 14,23h140l14,-23 -12,-27 -8,16 -10,-21 -7,16 -10,-21 -9,21zM194,325zM318,325z"
android:fillColor="#333"/>
<path
android:pathData="m183,290 l11,32h124l11,-32h-73z"
android:fillColor="#338af3"/>
<path
android:pathData="M256,129a4,4 0,0 0,-2 1l-100,73a4,4 0,0 0,-2 4l38,117a4,4 0,0 0,4 3h124a4,4 0,0 0,4 -3l38,-117a4,4 0,0 0,-2 -4l-100,-73a4,4 0,0 0,-2 -1zM256,138 L351,208 315,319L197,319l-36,-111 95,-70z"
android:fillColor="#eee"/>
<path
android:pathData="M256.5,170L256.5,170A4.5,4.5 0,0 1,261 174.5L261,307.5A4.5,4.5 0,0 1,256.5 312L256.5,312A4.5,4.5 0,0 1,252 307.5L252,174.5A4.5,4.5 0,0 1,256.5 170z"
android:fillColor="#ff9811"/>
<path
android:pathData="M204,338L308,338A12,12 0,0 1,320 350L320,350A12,12 0,0 1,308 362L204,362A12,12 0,0 1,192 350L192,350A12,12 0,0 1,204 338z"
android:fillColor="#d80027"/>
<path
android:pathData="M188,350L324,350A12,12 0,0 1,336 362L336,362A12,12 0,0 1,324 374L188,374A12,12 0,0 1,176 362L176,362A12,12 0,0 1,188 350z"
android:fillColor="#eee"/>
<path
android:pathData="m242,191 l14,-42 14,42 -36,-26h44z"
android:fillColor="#ffda44"/>
</group>
</vector>
@@ -0,0 +1,28 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h512v512H0Z"
android:fillColor="#eee"/>
<path
android:pathData="m350,335 l24,-24 16,16 -24,23zM311,374 L335,350 350,366 327,390zM398,382 L421,358 437,374 413,398zM358,421 L382,398 398,413 374,437ZM374,358 L398,335 413,350 390,374zM335,398 L358,374 374,390 350,413zM398,177 L335,114 350,99 414,162zM335,162 L311,138 327,122 350,146zM374,201 L350,177 366,162 390,185zM382,114 L358,91 374,75 398,99ZM421,154 L398,130 413,114 437,138ZM91,358l63,63 -16,16 -63,-63zM154,374 L177,398 162,413 138,390zM114,335 L138,358 122,374 99,350zM138,311 L201,374 185,390 122,327zM154,91 L91,154 75,138 138,75zM177,114 L114,177 99,161 162,98zM201,138 L138,201 122,185 185,122z"
android:fillColor="#333"/>
<path
android:pathData="M319,319 L193,193a89,89 0,1 1,126 126z"
android:fillColor="#d80027"/>
<path
android:pathData="M319,319a89,89 0,1 1,-126 -126z"
android:fillColor="#0052b4"/>
<path
android:pathData="M224.5,224.5m-44.5,0a44.5,44.5 0,1 1,89 0a44.5,44.5 0,1 1,-89 0"
android:fillColor="#d80027"/>
<path
android:pathData="M287.5,287.5m-44.5,0a44.5,44.5 0,1 1,89 0a44.5,44.5 0,1 1,-89 0"
android:fillColor="#0052b4"/>
</group>
</vector>
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h512v512H0Z"
android:fillColor="#d80027"/>
<path
android:pathData="M192,112a16,16 0,0 0,-8 2c-17,9 -33,20 -45,34 -8,-22 -24,-26 -24,-26s-14,13 -7,35c2,9 6,15 10,19 -8,14 -14,29 -18,45 -17,-15 -33,-10 -33,-10s-6,17 11,34c6,6 13,9 18,11 0,17 3,33 7,48 -22,-5 -33,7 -33,7s4,18 26,24c9,3 16,2 21,1 9,14 19,27 31,38 -22,6 -26,23 -26,23s13,14 35,7c9,-2 15,-6 19,-10a159,159 0,0 0,160 0c4,4 10,8 19,10 22,7 35,-7 35,-7s-4,-17 -26,-23c12,-11 22,-24 31,-38 5,1 12,2 21,-1 22,-6 26,-24 26,-24s-11,-12 -33,-7c4,-15 7,-31 7,-48 5,-2 12,-5 18,-11 17,-17 11,-34 11,-34s-16,-5 -33,10c-4,-16 -10,-31 -18,-45 4,-4 8,-10 10,-19 7,-22 -7,-35 -7,-35s-16,4 -24,26c-12,-14 -28,-25 -45,-34a16,16 0,0 0,-8 -2,16 16,0 0,0 -13,9 16,16 0,0 0,7 21c13,7 24,16 34,26 -23,1 -31,16 -31,16s8,16 32,16c8,0 15,-2 19,-5 6,10 10,20 12,31 -20,-11 -35,-2 -35,-2s-1,18 19,30c8,4 14,6 20,6 0,11 -2,23 -5,33l-1,-1c-11,-20 -30,-19 -30,-19s-9,15 3,36c4,7 9,12 14,14 -6,9 -12,18 -20,25 -1,-23 -17,-31 -17,-31s-16,8 -16,32c0,8 3,15 5,19a126,126 0,0 1,-122 0c3,-4 5,-11 5,-19 0,-24 -16,-32 -16,-32s-16,8 -17,31c-7,-7 -14,-16 -20,-25 5,-2 10,-7 14,-14 12,-21 3,-36 3,-36s-19,-1 -30,19v1c-4,-10 -6,-22 -6,-33 6,0 12,-2 20,-6 20,-12 19,-30 19,-30s-15,-9 -35,2c2,-11 6,-21 12,-31 4,3 11,5 19,5 24,0 32,-16 32,-16s-8,-15 -31,-16c10,-10 21,-19 34,-26a16,16 0,0 0,7 -21,16 16,0 0,0 -13,-9z"
android:fillColor="#ffda44"/>
</group>
</vector>
@@ -0,0 +1,28 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h167l84.9,45L345,0h167v512H345l-87.7,-48.1L167,512H0z"
android:fillColor="#a2001d"/>
<path
android:pathData="M167,0h178v512H167z"
android:fillColor="#0052b4"/>
<path
android:pathData="M122.4,256h22.3v89h-22.3zM33.4,256h22.3v89L33.4,345z"
android:fillColor="#ffda44"/>
<path
android:pathData="M89,289.4m-22.3,0a22.3,22.3 0,1 1,44.6 0a22.3,22.3 0,1 1,-44.6 0"
android:fillColor="#ffda44"/>
<path
android:pathData="M89,211.5m-11.1,0a11.1,11.1 0,1 1,22.2 0a11.1,11.1 0,1 1,-22.2 0"
android:fillColor="#ffda44"/>
<path
android:pathData="M66.8,322.8h44.5L111.3,345L66.8,345zM66.8,233.8h44.5L111.3,256L66.8,256zM89,133.5l8,24.2h25.4l-20.6,15 7.9,24.3L89,182l-20.6,15 7.9,-24.3 -20.6,-15h25.5z"
android:fillColor="#ffda44"/>
</group>
</vector>
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h100.2l66.1,53.5L233.7,0H512v189.3L466.3,257l45.7,65.8V512H233.7l-68,-50.7 -65.5,50.7H0V322.8l51.4,-68.5 -51.4,-65z"
android:fillColor="#d80027"/>
<path
android:pathData="M100.2,0v189.3H0v33.4l24.6,33L0,289.5v33.4h100.2V512h33.4l30.6,-26.3 36.1,26.3h33.4V322.8H512v-33.4l-24.6,-33.7 24.6,-33v-33.4H233.7V0h-33.4l-33.8,25.3L133.6,0z"
android:fillColor="#eee"/>
<path
android:pathData="M133.6,0v222.7H0v66.7h133.6V512h66.7V289.4H512v-66.7H200.3V0z"
android:fillColor="#0052b4"/>
</group>
</vector>
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,144.7 L258.8,39.6 512,144.7v222.6L257,493 0,367.3z"
android:fillColor="#eee"/>
<path
android:pathData="M0,0v144.7h105.6v-22.2h33.6v22.2h33.3v-22.2h33.6v22.2h33.3v-22.2H273v22.2h33v-22.2h33.6v22.2h33.2v-22.2h33.6v22.2H512V0z"
android:fillColor="#6da544"/>
<path
android:pathData="M0,367.3L0,512h512L512,367.3L406.4,367.3v22.4h-33.6v-22.4h-33.2v22.4L306,389.7v-22.4h-33v22.4h-33.6v-22.4h-33.3v22.4h-33.6v-22.4h-33.3v22.4h-33.6v-22.4zM339.1,189.3h-33.4c0.2,3.7 0.4,7.4 0.4,11.1 0,24.8 -6.2,48.8 -17,66 -3.3,5.2 -9,12.6 -16.4,17.6v-94.7h-33.4v94.8c-7.5,-5 -13,-12.4 -16.4,-17.7 -10.8,-17 -17,-41 -17,-65.9 0,-3.7 0.2,-7.4 0.4,-11L173,189.5a190,190 0,0 0,-0.4 11c0,68.7 36.7,122.5 83.5,122.5s83.5,-53.8 83.5,-122.5c0,-3.7 -0.1,-7.4 -0.4,-11z"
android:fillColor="#d80027"/>
</group>
</vector>
@@ -0,0 +1,22 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h512v256l-265,45.2z"
android:fillColor="#0052b4"/>
<path
android:pathData="M210,256h302v256H0z"
android:fillColor="#d80027"/>
<path
android:pathData="M0,0v512l256,-256z"
android:fillColor="#eee"/>
<path
android:pathData="M175.3,256 L144,241.3l16.7,-30.3 -34,6.5 -4.3,-34.3 -23.6,25.2L75,183.2l-4.3,34.3 -34,-6.5 16.7,30.3L22.3,256l31.2,14.7L37,301l34,-6.5 4.2,34.3 23.7,-25.2 23.6,25.2 4.3,-34.3 34,6.5 -16.7,-30.3zM68.3,100.2 L78.7,114.7 95.7,109.3 85.1,123.7 95.5,138.2 78.5,132.6L68,147l0.2,-17.9 -17,-5.6 17,-5.4zM68.3,365 L78.7,379.6 95.7,374.2 85.1,388.5 95.5,403.1 78.5,397.4L68,411.8l0.2,-17.9 -17,-5.6 17,-5.4zM216.7,232.6L206.3,247l-17,-5.4 10.5,14.4 -10.4,14.6 17,-5.7 10.6,14.4 -0.1,-17.9 17,-5.6 -17.1,-5.4z"
android:fillColor="#ffda44"/>
</group>
</vector>
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="m0,256 l256.4,-44.3L512,256v256H0z"
android:fillColor="#d80027"/>
<path
android:pathData="M0,0h512v256H0z"
android:fillColor="#eee"/>
</group>
</vector>
@@ -0,0 +1,25 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,512h167l37.9,-260.3L167,0H0z"
android:fillColor="#6da544"/>
<path
android:pathData="M512,0H167v512h345z"
android:fillColor="#d80027"/>
<path
android:pathData="M167,256m-89,0a89,89 0,1 1,178 0a89,89 0,1 1,-178 0"
android:fillColor="#ffda44"/>
<path
android:pathData="M116.9,211.5V267a50,50 0,1 0,100.1 0v-55.6H117z"
android:fillColor="#d80027"/>
<path
android:pathData="M167,283.8c-9.2,0 -16.7,-7.5 -16.7,-16.7V245h33.4v22c0,9.2 -7.5,16.7 -16.7,16.7z"
android:fillColor="#eee"/>
</group>
</vector>
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M167,0h178l25.9,252.3L345,512H167l-29.8,-253.4z"
android:fillColor="#ffda44"/>
<path
android:pathData="M0,0h167v512H0z"
android:fillColor="#0052b4"/>
<path
android:pathData="M345,0h167v512H345z"
android:fillColor="#d80027"/>
</group>
</vector>
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M512,170v172l-256,32L0,342V170l256,-32z"
android:fillColor="#0052b4"/>
<path
android:pathData="M512,0v170H0V0Z"
android:fillColor="#eee"/>
<path
android:pathData="M512,342v170H0V342Z"
android:fillColor="#d80027"/>
</group>
</vector>
@@ -0,0 +1,31 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="m0,160 l256,-32 256,32v192l-256,32L0,352z"
android:fillColor="#0052b4"/>
<path
android:pathData="M0,0h512v160H0z"
android:fillColor="#eee"/>
<path
android:pathData="M0,352h512v160H0z"
android:fillColor="#d80027"/>
<path
android:pathData="M64,63v217c0,104 144,137 144,137s144,-33 144,-137V63z"
android:fillColor="#eee"/>
<path
android:pathData="M96,95v185a83,78 0,0 0,9 34h206a83,77 0,0 0,9 -34V95z"
android:fillColor="#d80027"/>
<path
android:pathData="M288,224h-64v-32h32v-32h-32v-32h-32v32h-32v32h32v32h-64v32h64v32h32v-32h64z"
android:fillColor="#eee"/>
<path
android:pathData="M152,359a247,231 0,0 0,56 24c12,-3 34,-11 56,-24a123,115 0,0 0,47 -45,60 56,0 0,0 -34,-10l-14,2a60,56 0,0 0,-110 0,60 56,0 0,0 -14,-2c-12,0 -24,4 -34,10a123,115 0,0 0,47 45z"
android:fillColor="#0052b4"/>
</group>
</vector>
@@ -0,0 +1,91 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="m0,128 l256,-32 256,32v256l-256,32L0,384Z"
android:fillColor="#ffda44"/>
<path
android:pathData="M0,0h512v128L0,128zM0,384h512v128L0,512z"
android:fillColor="#d80027"/>
<path
android:pathData="M144,304h-16v-80h16zM272,304h16v-80h-16z"
android:fillColor="#eee"/>
<path
android:pathData="M160,296a48,32 0,1 0,96 0a48,32 0,1 0,-96 0z"
android:fillColor="#eee"/>
<path
android:pathData="M136,192L136,192A8,8 0,0 1,144 200L144,208A8,8 0,0 1,136 216L136,216A8,8 0,0 1,128 208L128,200A8,8 0,0 1,136 192z"
android:fillColor="#d80027"/>
<path
android:pathData="M280,192L280,192A8,8 0,0 1,288 200L288,208A8,8 0,0 1,280 216L280,216A8,8 0,0 1,272 208L272,200A8,8 0,0 1,280 192z"
android:fillColor="#d80027"/>
<path
android:pathData="M208,272v24a24,24 0,0 0,24 24,24 24,0 0,0 24,-24v-24h-24z"
android:fillColor="#d80027"/>
<path
android:pathData="M128,208L144,208A8,8 0,0 1,152 216L152,216A8,8 0,0 1,144 224L128,224A8,8 0,0 1,120 216L120,216A8,8 0,0 1,128 208z"
android:fillColor="#ff9811"/>
<path
android:pathData="M272,208L288,208A8,8 0,0 1,296 216L296,216A8,8 0,0 1,288 224L272,224A8,8 0,0 1,264 216L264,216A8,8 0,0 1,272 208z"
android:fillColor="#ff9811"/>
<path
android:pathData="M128,304L144,304A8,8 0,0 1,152 312L152,312A8,8 0,0 1,144 320L128,320A8,8 0,0 1,120 312L120,312A8,8 0,0 1,128 304z"
android:fillColor="#ff9811"/>
<path
android:pathData="M272,304L288,304A8,8 0,0 1,296 312L296,312A8,8 0,0 1,288 320L272,320A8,8 0,0 1,264 312L264,312A8,8 0,0 1,272 304z"
android:fillColor="#ff9811"/>
<path
android:pathData="M160,272v24c0,8 4,14 9,19l5,-6 5,10a21,21 0,0 0,10 0l5,-10 5,6c6,-5 9,-11 9,-19v-24h-9l-5,8 -5,-8h-10l-5,8 -5,-8z"
android:fillColor="#ff9811"/>
<path
android:fillColor="#FF000000"
android:pathData="M122,252h172m-172,24h28m116,0h28"/>
<path
android:pathData="M122,248a4,4 0,0 0,-4 4,4 4,0 0,0 4,4h172a4,4 0,0 0,4 -4,4 4,0 0,0 -4,-4zM122,272a4,4 0,0 0,-4 4,4 4,0 0,0 4,4h28a4,4 0,0 0,4 -4,4 4,0 0,0 -4,-4zM266,272a4,4 0,0 0,-4 4,4 4,0 0,0 4,4h28a4,4 0,0 0,4 -4,4 4,0 0,0 -4,-4z"
android:fillColor="#d80027"/>
<path
android:pathData="M196,168c-7,0 -13,5 -15,11l-5,-1c-9,0 -16,7 -16,16s7,16 16,16c7,0 13,-4 15,-11a16,16 0,0 0,17 -4,16 16,0 0,0 17,4 16,16 0,1 0,10 -20,16 16,0 0,0 -27,-5c-3,-4 -7,-6 -12,-6zM196,176c5,0 8,4 8,8 0,5 -3,8 -8,8 -4,0 -8,-3 -8,-8 0,-4 4,-8 8,-8zM220,176c5,0 8,4 8,8 0,5 -3,8 -8,8 -4,0 -8,-3 -8,-8 0,-4 4,-8 8,-8zM176,186 L180,187 184,195c0,4 -4,7 -8,7s-8,-3 -8,-8c0,-4 4,-8 8,-8zM240,186c5,0 8,4 8,8 0,5 -3,8 -8,8 -4,0 -8,-3 -8,-7l4,-8z"
android:fillColor="#eee"/>
<path
android:pathData="M200,160h16v32h-16z"
android:fillColor="#ff9811"/>
<path
android:pathData="M208,224h48v48h-48z"
android:fillColor="#eee"/>
<path
android:pathData="m248,208 l-8,8h-64l-8,-8c0,-13 18,-24 40,-24s40,11 40,24zM160,224h48v48h-48z"
android:fillColor="#d80027"/>
<path
android:pathData="M232,232L232,232A10,10 0,0 1,242 242L242,254A10,10 0,0 1,232 264L232,264A10,10 0,0 1,222 254L222,242A10,10 0,0 1,232 232z"
android:fillColor="#d80027"/>
<path
android:pathData="M168,232v8h8v16h-8v8h32v-8h-8v-16h8v-8zM176,216h64v8h-64z"
android:fillColor="#ff9811"/>
<path
android:pathData="M186,202m-6,0a6,6 0,1 1,12 0a6,6 0,1 1,-12 0"
android:fillColor="#ffda44"/>
<path
android:pathData="M208,202m-6,0a6,6 0,1 1,12 0a6,6 0,1 1,-12 0"
android:fillColor="#ffda44"/>
<path
android:pathData="M230,202m-6,0a6,6 0,1 1,12 0a6,6 0,1 1,-12 0"
android:fillColor="#ffda44"/>
<path
android:pathData="M169,272v43a24,24 0,0 0,10 4v-47h-10zM189,272v47a24,24 0,0 0,10 -4v-43h-10z"
android:fillColor="#d80027"/>
<path
android:pathData="M208,272m-16,0a16,16 0,1 1,32 0a16,16 0,1 1,-32 0"
android:fillColor="#338af3"/>
<path
android:pathData="M272,320L288,320A8,8 0,0 1,296 328L296,328A8,8 0,0 1,288 336L272,336A8,8 0,0 1,264 328L264,328A8,8 0,0 1,272 320z"
android:fillColor="#338af3"/>
<path
android:pathData="M128,320L144,320A8,8 0,0 1,152 328L152,328A8,8 0,0 1,144 336L128,336A8,8 0,0 1,120 328L120,328A8,8 0,0 1,128 320z"
android:fillColor="#338af3"/>
</group>
</vector>
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h133.6l35.3,16.7L200.3,0H512v222.6l-22.6,31.7 22.6,35.1V512H200.3l-32,-19.8 -34.7,19.8H0V289.4l22.1,-33.3L0,222.6z"
android:fillColor="#0052b4"/>
<path
android:pathData="M133.6,0v222.6H0v66.8h133.6V512h66.7V289.4H512v-66.8H200.3V0z"
android:fillColor="#ffda44"/>
</group>
</vector>
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h512v89l-79.2,163.7L512,423v89H0v-89l82.7,-169.6L0,89z"
android:fillColor="#d80027"/>
<path
android:pathData="M0,89h512v78l-42.6,91.2L512,345v78H0v-78l40,-92.5L0,167z"
android:fillColor="#eee"/>
<path
android:pathData="M0,167h512v178H0z"
android:fillColor="#0052b4"/>
</group>
</vector>
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h512v512H0z"
android:fillColor="#d80027"/>
<path
android:pathData="m245.5,209.2 l21,29 34,-11.1 -21,29 21,28.9 -34,-11.1 -21,29V267l-34,-11.1 34,-11z"
android:fillColor="#eee"/>
<path
android:pathData="M188.2,328.3a72.3,72.3 0,1 1,34.4 -136,89 89,0 1,0 0,127.3 72,72 0,0 1,-34.4 8.7z"
android:fillColor="#eee"/>
</group>
</vector>
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="m0,256 l258,-39.4L512,256v256H0z"
android:fillColor="#ffda44"/>
<path
android:pathData="M0,0h512v256H0z"
android:fillColor="#338af3"/>
</group>
</vector>
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group>
<clip-path
android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0"/>
<path
android:pathData="M0,0h512v512H0z"
android:fillColor="#d80027"/>
<path
android:pathData="m256,133.6 l27.6,85H373L300.7,271l27.6,85 -72.3,-52.5 -72.3,52.6 27.6,-85 -72.3,-52.6h89.4z"
android:fillColor="#ffda44"/>
</group>
</vector>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

+177
View File
@@ -0,0 +1,177 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="galleryblock_language">言語: %1$s</string>
<string name="galleryblock_series">シリーズ: %1$s</string>
<string name="galleryblock_type">タイプ: %1$s</string>
<string name="main_no_result">結果なし</string>
<string name="search_hint">ギャラリー検索</string>
<string name="settings_clear_cache">キャッシュクリア</string>
<string name="settings_clear_cache_alert_message">キャッシュをクリアするとイメージのロード速度に影響を与えます。実行しますか?</string>
<string name="settings_storage_usage">%s使用中</string>
<string name="settings_storage_usage_loading">ストレージ使用量読み込み中…</string>
<string name="settings_default_query">デフォルトキーワード</string>
<string name="settings_galleries_per_page">一回にロードするギャラリー数</string>
<string name="settings_search_title">検索設定</string>
<string name="settings_title">設定</string>
<string name="update_notification_description">アップデートダウンロード中</string>
<string name="doujinshi">同人誌</string>
<string name="manga">漫画</string>
<string name="artist_cg">アーティストCG</string>
<string name="game_cg">ゲームCG</string>
<string name="image_set">イメージまとめ</string>
<string name="update_title">新しいアップデートがあります</string>
<string name="warning">注意</string>
<string name="settings_miscellaneous_title">その他</string>
<string name="settings_mirror_title">ミラーサーバー</string>
<string name="settings_clear_history">履歴を削除</string>
<string name="settings_clear_history_alert_message">履歴を削除しますか?</string>
<string name="settings_clear_history_summary">履歴数: %1$d</string>
<string name="main_destination_history">履歴</string>
<string name="notification_denied">通知を無効にするとバックグラウンドダウンロード及びアプリのアップデート機能が使用不可になります。</string>
<string name="main_destination_search">トップ</string>
<string name="update_release_note"># リリースノート(v%1$s)\n%2$s</string>
<string name="settings_security_mode_title">セキュリティーモード</string>
<string name="settings_security_mode_summary">アプリ履歴でアプリの画面を表示しない</string>
<string name="reader_go_to_page">移動</string>
<string name="default_query_dialog_language_selector_none">非選択</string>
<string name="default_query_dialog_filter_BL">BLフィルター</string>
<string name="default_query_dialog_filter_guro">グロフィルター</string>
<string name="default_query_dialog_language">"言語: "</string>
<string name="default_query_dialog_title">デフォルトキーワード設定</string>
<string name="main_destination_settings">設定</string>
<string name="main_open_navigation_drawer">メニューを開く</string>
<string name="main_drawer_group_contact_title">お問い合わせ先</string>
<string name="main_drawer_group_contact_homepage">ホームページ</string>
<string name="main_drawer_group_contact_help">ヘルプ</string>
<string name="main_drawer_group_contact_github">Github</string>
<string name="main_drawer_group_contact_email">メールを送る</string>
<string name="reader_fab_fullscreen">フルスクリーン</string>
<string name="channel_download">ダウンロード</string>
<string name="channel_download_description">ダウンロードの進行を通知</string>
<string name="reader_fab_download">バックグラウンドダウンロード</string>
<string name="reader_notification_text">ダウンロード中…</string>
<string name="reader_notification_complete">ダウンロード完了</string>
<string name="reader_fab_download_cancel">バックグラウンドダウンロード中止</string>
<string name="main_destination_downloads">ダウンロード</string>
<string name="main_jump_title">ページ移動</string>
<string name="main_jump_message">現ページ番号: %1$d\nページ数: %2$d</string>
<string name="unable_to_connect">hitomi.laに接続できません</string>
<string name="main_move_to_page">%1$dページへ移動</string>
<string name="settings_clear_downloads">ダウンロード削除</string>
<string name="settings_clear_downloads_alert_message">ダウンロードしたギャラリーを全て削除します。\n実行しますか?</string>
<string name="settings_mirror_summary">ミラーサーバからイメージをロード</string>
<string name="main_destination_favorites">ブックマーク</string>
<string name="main_open_gallery_by_id">ギャラリー番号で見る</string>
<string name="reader_failed_to_find_gallery">エラーが発生しました</string>
<string name="settings_storage">ストレージ</string>
<string name="main_drawer_grouop_contact_discord">ディスコード</string>
<string name="settings_app_lock">アプリロック</string>
<string name="settings_app_lock_type">アップロックの種類</string>
<string name="settings_app_version_title">バージョン(アップデート確認)</string>
<string name="settings_lock_biometrics">生体認識</string>
<string name="settings_lock_confirm">ロック確認のためもう一回入力してください。</string>
<string name="settings_lock_enabled">有効</string>
<string name="settings_lock_fingerprint">指紋</string>
<string name="settings_lock_password">パスワード</string>
<string name="settings_lock_pattern">パターン</string>
<string name="settings_lock_wrong_confirm">ロックが一致しません。やり直してください。</string>
<string name="settings_lock_none">なし</string>
<string name="settings_lock_remove_message">ロックを無効にしますか?</string>
<string name="reader_loading">ロード中</string>
<string name="main_menu_sort">ソート</string>
<string name="main_menu_sort_newest">投稿日時順</string>
<string name="main_menu_sort_popular">人気順</string>
<string name="ignore">無視</string>
<string name="lock_corrupted">ロックファイルが破損されています。Pupilを再再インストールしてください。</string>
<string name="settings_dark_mode_title">ダークモード</string>
<string name="settings_dark_mode_summary">夜にシコりたい方々へ</string>
<string name="search_add_query_item">追加</string>
<string name="gallery_details">ギャラリー情報</string>
<string name="gallery_artists">アーティスト</string>
<string name="gallery_characters">キャラクター</string>
<string name="gallery_groups">グループ</string>
<string name="gallery_language">言語</string>
<string name="gallery_series">シリーズ</string>
<string name="gallery_tags">タグ</string>
<string name="gallery_thumbnails">サムネイル</string>
<string name="gallery_related">おすすめ</string>
<string name="settings_nomedia_title">イメージを隠す</string>
<string name="main_delete">削除</string>
<string name="download">ダウンロード</string>
<string name="settings_backup_title">ブックマークバックアップ</string>
<string name="settings_restore_title">ブックマーク復元</string>
<string name="settings_backup_file_created">バックアップファイルを作成しました</string>
<string name="settings_restore_failed">復元に失敗しました</string>
<string name="settings_restore_success">%1$d項目を復元しました</string>
<string name="settings_download_folder">ダウンロード場所</string>
<string name="settings_download_folder_internal">内部ストレージ</string>
<string name="settings_download_folder_removable">外部SDカード</string>
<string name="settings_download_folder_available">%s 使用可能</string>
<string name="update_download_completed">ダウンロードが完了しました</string>
<string name="update_download_completed_description">ここをクリックしてアップデートを行えます</string>
<string name="settings_beta">ベータチャンネルでアップデートを受信</string>
<string name="settings_app_version_description">v%s</string>
<string name="settings_low_quality">低解像度イメージ</string>
<string name="settings_low_quality_summary">ロード速度とデータ使用料を改善するため低解像度イメージをロード</string>
<string name="settings_download_folder_custom">手動で設定</string>
<string name="settings_download_folder_not_writable">このフォルダにアクセスできません。他のフォルダを選択してください。</string>
<string name="settings_proxy_title">プロクシ</string>
<string name="proxy_dialog_username_hint">ID</string>
<string name="proxy_dialog_type">プロクシタイプ</string>
<string name="proxy_dialog_port_hint">ポート</string>
<string name="proxy_dialog_password_hint">パスワード</string>
<string name="proxy_dialog_error">エラー</string>
<string name="proxy_dialog_addr_hint">サーバーアドレス</string>
<string name="proxy_dialog_server">サーバー</string>
<string name="main_menu_thin">簡単モード</string>
<string name="main_fab_cancel">すべてのダウンロードキャンセル</string>
<string name="channel_update">アップデート</string>
<string name="channel_update_description">アップデートの進行状態を表示</string>
<string name="settings_import_old_galleries">旧ギャラリーインポート</string>
<string name="import_old_galleries_folder_not_readable">フォルダを読めません</string>
<string name="import_old_galleries_notification">旧ギャラリーインポート中…</string>
<string name="import_old_galleries_notification_done">インポート完了</string>
<string name="main_fab_random">ランダムギャラリーを開く</string>
<string name="settings_lock_fingerprint_without_lock">予備のロックが設定されていないと指紋ロックは使用できません</string>
<string name="settings_lock_fingerprint_prompt">Pupil指紋ロック™</string>
<string name="settings_lock_fingerprint_prompt_subtitle">こうかはばつぐんだ!</string>
<string name="default_query_dialog_filter_loli">登場人物を全て18歳以上にする</string>
<string name="settings_user_id">ユーザーID</string>
<string name="copied_to_clipboard">クリップボードにコピーしました</string>
<string name="reader_fab_retry">リトライ</string>
<string name="reader_fab_auto">まばたき検知スクロール</string>
<string name="search_all">全てのギャラリーを対象に検索</string>
<string name="settings_rtl">綴じ方向を左にする</string>
<string name="settings_manage_favorites">ブックマーク管理</string>
<string name="settings_backup_failed">エラーが発生しました</string>
<string name="settings_backup_share">バックアップ共有</string>
<string name="channel_downloader">ダウンローダ</string>
<string name="channel_downloader_description">ダウンローダの状態を表示</string>
<string name="downloader_running">ダウンローダー起動中</string>
<string name="settings_download_folder_name">フォルダ名パターン</string>
<string name="settings_invalid_download_folder_name">フォルダ名に使用できない文字が含まれています</string>
<string name="settings_download_folder_name_message">%sに含まれている文字列を対応する変数に置換します\n\n%s</string>
<string name="settings_manage_storage">ストレージ管理</string>
<string name="settings_oss">オープンソースライセンス</string>
<string name="search_show_tags">お気に入りのタグを見る</string>
<string name="search_show_histories">履歴を見る</string>
<string name="reader_fab_auto_cancel">まばたき検知を中止</string>
<string name="camera_denied">カメラ権限が拒否されているため、まばたき検知使用できません</string>
<string name="no_camera">この機器には前面カメラが装着されていません</string>
<string name="error">エラー</string>
<string name="settings_cache_limit">キャッシュサイズ制限</string>
<string name="unlimited">制限なし</string>
<string name="settings_tag_translation">タグ言語</string>
<string name="settings_tag_translation_message">Githubにて翻訳に参加できます</string>
<string name="settings_max_concurrent_download">並列ダウンロード</string>
<string name="unaccessible_download_folder">アンドロイド11以上では外部からのアプリ内部空間接近が不可能です。ダウンロードフォルダを変更しますか?</string>
<string name="settings_networking">ネットワーク</string>
<string name="settings_recover_downloads">ダウンロードデータベースを再構築</string>
<string name="main_close_navigation_drawer">メニューを閉じる</string>
<string name="search_remove_query_item_description">検索構文を除去</string>
<string name="search_add_query_item_tag">タグ</string>
<string name="move_to_page">%1$d ページへ移動</string>
<string name="search_bar_edit_tag">タッチして編集</string>
<string name="main_destination_image_viewer">イメージビューア</string>
<string name="not_implemented">この機能はまだ実装されていません</string>
</resources>
+177
View File
@@ -0,0 +1,177 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="galleryblock_language">언어: %1$s</string>
<string name="galleryblock_series">시리즈: %1$s</string>
<string name="galleryblock_type">종류: %1$s</string>
<string name="search_hint">갤러리 검색</string>
<string name="settings_default_query">기본 검색어</string>
<string name="settings_clear_cache">캐시 정리하기</string>
<string name="settings_clear_cache_alert_message">캐시를 정리하면 이미지 로딩속도가 느려질 수 있습니다. 계속하시겠습니까?</string>
<string name="settings_storage_usage">%s 사용중</string>
<string name="settings_storage_usage_loading">저장공간 사용량 계산 중…</string>
<string name="settings_galleries_per_page">한 번에 로드할 갤러리 수</string>
<string name="settings_search_title">검색 설정</string>
<string name="settings_title">설정</string>
<string name="update_notification_description">업데이트 다운로드중&#8230;</string>
<string name="doujinshi">동인지</string>
<string name="manga">만화</string>
<string name="artist_cg">아티스트 CG</string>
<string name="game_cg">게임 CG</string>
<string name="image_set">이미지 모음</string>
<string name="update_title">업데이트가 있습니다!</string>
<string name="warning">경고</string>
<string name="main_no_result">결과 없음\n해결법</string>
<string name="settings_miscellaneous_title">기타</string>
<string name="settings_clear_history">기록 삭제</string>
<string name="settings_clear_history_alert_message">기록을 삭제하시겠습니까?</string>
<string name="settings_clear_history_summary">기록 %1$d개 저장됨</string>
<string name="main_destination_history">기록</string>
<string name="notification_denied">백그라운드 다운로드를 위해서는 알림을 활성화할 필요가 있습니다. 알림을 비활성화하면 백그라운드 다운로드와 앱 업데이트 기능을 사용할 수 없습니다.</string>
<string name="main_destination_search">홈</string>
<string name="update_release_note"># 릴리즈 노트(v%1$s)\n%2$s</string>
<string name="settings_security_mode_summary">최근 앱 목록 창에서 앱 화면을 보이지 않게 합니다</string>
<string name="settings_security_mode_title">보안 모드 활성화</string>
<string name="reader_go_to_page">이동</string>
<string name="default_query_dialog_language_selector_none">미선택</string>
<string name="default_query_dialog_filter_BL">BL물 필터</string>
<string name="default_query_dialog_filter_guro">고어물 필터</string>
<string name="default_query_dialog_language">"언어: "</string>
<string name="default_query_dialog_title">기본 검색어 설정</string>
<string name="main_drawer_group_contact_email">메일 보내기!</string>
<string name="main_drawer_group_contact_github">Github</string>
<string name="main_drawer_group_contact_help">도움말</string>
<string name="main_drawer_group_contact_homepage">홈페이지</string>
<string name="main_destination_settings">설정</string>
<string name="main_destination_image_viewer">뷰어</string>
<string name="main_open_navigation_drawer">메뉴 열기</string>
<string name="main_drawer_group_contact_title">문의</string>
<string name="reader_fab_fullscreen">전체 화면</string>
<string name="channel_download">다운로드</string>
<string name="channel_download_description">다운로드 상태 알림</string>
<string name="reader_fab_download">백그라운드 다운로드</string>
<string name="reader_notification_text">다운로드 중…</string>
<string name="reader_notification_complete">다운로드 완료</string>
<string name="reader_fab_download_cancel">백그라운드 다운로드 취소</string>
<string name="main_destination_downloads">다운로드</string>
<string name="main_jump_title">페이지 이동</string>
<string name="main_jump_message">현재 페이지: %1$d\n페이지 수: %2$d</string>
<string name="unable_to_connect">hitomi.la에 연결할 수 없습니다</string>
<string name="main_move_to_page">%1$d 페이지로 이동</string>
<string name="settings_clear_downloads">다운로드 삭제</string>
<string name="settings_clear_downloads_alert_message">다운로드 된 만화를 모두 삭제합니다.\n계속하시겠습니까?</string>
<string name="main_destination_favorites">즐겨찾기</string>
<string name="main_open_gallery_by_id">갤러리 번호로 열기</string>
<string name="reader_failed_to_find_gallery">갤러리를 찾지 못했습니다</string>
<string name="settings_storage">저장 공간</string>
<string name="main_drawer_grouop_contact_discord">디스코드</string>
<string name="settings_app_lock">앱 잠금</string>
<string name="settings_app_lock_type">앱 잠금 종류</string>
<string name="settings_app_version_title">앱 버전(업데이트 확인)</string>
<string name="settings_lock_biometrics">생체 인식</string>
<string name="settings_lock_confirm">잠금 확인을 위해 한번 더 입력해주세요</string>
<string name="settings_lock_enabled">사용 중</string>
<string name="settings_lock_fingerprint">지문</string>
<string name="settings_lock_password">비밀번호</string>
<string name="settings_lock_pattern">패턴</string>
<string name="settings_lock_wrong_confirm">잠금이 일치하지 않습니다. 다시 시도하세요.</string>
<string name="settings_lock_none">없음</string>
<string name="settings_lock_remove_message">잠금을 해제할까요?</string>
<string name="reader_loading">로딩중</string>
<string name="main_menu_sort">정렬</string>
<string name="main_menu_sort_popular">인기순</string>
<string name="main_menu_sort_newest">시간순</string>
<string name="ignore">무시</string>
<string name="lock_corrupted">잠금 파일이 손상되었습니다! 앱을 재설치 해 주시기 바랍니다.</string>
<string name="settings_dark_mode_title">다크 모드</string>
<string name="settings_dark_mode_summary">딥 다크한 모오드</string>
<string name="search_add_query_item">추가</string>
<string name="gallery_details">갤러리 정보</string>
<string name="gallery_artists">작가</string>
<string name="gallery_characters">캐릭터</string>
<string name="gallery_groups">그룹</string>
<string name="gallery_language">언어</string>
<string name="gallery_series">시리즈</string>
<string name="gallery_tags">태그</string>
<string name="gallery_related">관련 갤러리</string>
<string name="gallery_thumbnails">미리보기</string>
<string name="settings_nomedia_title">이미지 숨기기</string>
<string name="main_delete">삭제</string>
<string name="download">다운로드</string>
<string name="settings_backup_title">즐겨찾기 백업</string>
<string name="settings_restore_title">즐겨찾기 복원</string>
<string name="settings_backup_file_created">백업 파일을 생성하였습니다</string>
<string name="settings_restore_failed">복원에 실패했습니다</string>
<string name="settings_restore_success">%1$d개 항목을 복원했습니다</string>
<string name="settings_download_folder">다운로드 위치</string>
<string name="settings_download_folder_internal">내부 저장공간</string>
<string name="settings_download_folder_removable">외부 SD카드</string>
<string name="settings_download_folder_available">%s 사용 가능</string>
<string name="update_download_completed">다운로드가 완료되었습니다</string>
<string name="update_download_completed_description">여기를 클릭해서 업데이트를 진행할 수 있습니다</string>
<string name="settings_beta">베타 채널에서 업데이트</string>
<string name="settings_app_version_description">v%s</string>
<string name="settings_low_quality">저해상도 이미지</string>
<string name="settings_low_quality_summary">로드 속도와 데이터 사용량을 줄이기 위해 저해상도 이미지를 로드</string>
<string name="settings_mirror_summary">미러 서버에서 이미지 로드</string>
<string name="settings_mirror_title">미러 설정</string>
<string name="settings_download_folder_custom">직접 설정</string>
<string name="settings_download_folder_not_writable">이 폴더에 접근할 수 없습니다. 다른 폴더를 선택해주세요.</string>
<string name="settings_proxy_title">프록시</string>
<string name="proxy_dialog_username_hint">ID</string>
<string name="proxy_dialog_type">프록시 타입</string>
<string name="proxy_dialog_port_hint">포트</string>
<string name="proxy_dialog_password_hint">비밀번호</string>
<string name="proxy_dialog_error">잘못된 값</string>
<string name="proxy_dialog_addr_hint">서버 주소</string>
<string name="proxy_dialog_server">서버</string>
<string name="main_menu_thin">간단히 보기</string>
<string name="main_fab_cancel">다운로드 모두 취소</string>
<string name="channel_update">업데이트</string>
<string name="channel_update_description">업데이트 진행상황 표시</string>
<string name="settings_import_old_galleries">이전 버전 갤러리 가져오기</string>
<string name="import_old_galleries_folder_not_readable">폴더를 읽을 수 없습니다</string>
<string name="import_old_galleries_notification">이전 버전 갤러리 가져오는 중…</string>
<string name="import_old_galleries_notification_done">가져오기 완료</string>
<string name="main_fab_random">무작위 갤러리 열기</string>
<string name="settings_lock_fingerprint_without_lock">지문 잠금은 다른 잠금 방식이 활성화 되어 있을 때만 사용 가능합니다</string>
<string name="settings_lock_fingerprint_prompt">Pupil 지문 인식™</string>
<string name="settings_lock_fingerprint_prompt_subtitle">힘세고 강한 지문 인식</string>
<string name="default_query_dialog_filter_loli">판사님 저는 페도가 아닙니다</string>
<string name="settings_user_id">유저 ID</string>
<string name="copied_to_clipboard">클립보드에 복사됨</string>
<string name="reader_fab_retry">재시도</string>
<string name="reader_fab_auto">눈 깜빡임 감지 스크롤</string>
<string name="search_all">모든 갤러리 검색</string>
<string name="settings_rtl">좌측으로 페이지 넘기기</string>
<string name="settings_manage_favorites">즐겨찾기 관리</string>
<string name="settings_backup_failed">업로드 실패</string>
<string name="settings_backup_share">백업 공유</string>
<string name="channel_downloader">다운로더</string>
<string name="channel_downloader_description">다운로더 작동 여부 표시</string>
<string name="downloader_running">다운로더 작동중…</string>
<string name="settings_download_folder_name">폴더명 패턴</string>
<string name="settings_invalid_download_folder_name">폴더 패턴에 사용할 수 없는 문자가 포함되어 있습니다</string>
<string name="settings_download_folder_name_message">지원되는 변수는 %s 입니다\n\n%s</string>
<string name="settings_manage_storage">저장소 관리</string>
<string name="settings_oss">오픈 소스 라이선스</string>
<string name="search_show_histories">검색 기록 보기</string>
<string name="search_show_tags">즐겨찾기 태그 보기</string>
<string name="reader_fab_auto_cancel">눈 깜빡임 감지 중지</string>
<string name="camera_denied">카메라 권한이 거부되었기 때문에 눈 깜빡임 감지가 불가능합니다</string>
<string name="no_camera">이 장치에는 전면 카메라가 없습니다</string>
<string name="error">오류</string>
<string name="settings_cache_limit">캐시 크기 제한</string>
<string name="unlimited">무제한</string>
<string name="settings_tag_translation">태그 언어</string>
<string name="settings_tag_translation_message">Github에서 번역에 참여하세요</string>
<string name="settings_max_concurrent_download">병렬 다운로드</string>
<string name="unaccessible_download_folder">안드로이드 11 이상에서는 외부에서 현재 다운로드 폴더에 접근할 수 없습니다. 변경하시겠습니까?</string>
<string name="settings_networking">네트워크</string>
<string name="settings_recover_downloads">다운로드 데이터베이스 복구</string>
<string name="main_close_navigation_drawer">메뉴 닫기</string>
<string name="search_remove_query_item_description">검색 구문 제거</string>
<string name="search_add_query_item_tag">태그</string>
<string name="move_to_page">%1$d 페이지로 이동</string>
<string name="search_bar_edit_tag">터치하여 수정</string>
<string name="not_implemented">이 기능은 아직 개발 중입니다</string>
</resources>
+275
View File
@@ -0,0 +1,275 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name" translatable="false" tools:override="true">Pupil</string>
<string name="release_url" translatable="false">https://api.github.com/repos/tom5079/Pupil/releases</string>
<string name="home_page" translatable="false">http://bit.ly/2EZDClw</string>
<string name="help" translatable="false">http://bit.ly/2Z7lNZE</string>
<string name="github" translatable="false">https://github.com/tom5079/Pupil/</string>
<string name="email" translatable="false">mailto:pupil.hentai@gmail.com</string>
<string name="discord" translatable="false">https://discord.gg/Stj4b5v</string>
<!-- Korean only -->
<string name="https_text" translatable="false">해결법</string>
<string name="https" translatable="false">https://bit.ly/34dUBwy</string>
<string name="backup_url" translatable="false">http://ix.io/</string>
<string name="main_settings" translatable="false">Settings</string>
<string name="galleryblock_thumbnail_description" translatable="false">Thumbnail</string>
<string name="reader_imageview_description" translatable="false">Content ImageView</string>
<string name="page_indicator_placeholder" translatable="false">-/-</string>
<string name="galleryblock_artist_with_group" translatable="false">%s (%s)</string>
<!-- Translate needed down here -->
<string name="warning">Warning</string>
<string name="error">Error</string>
<string name="ignore">Ignore</string>
<string name="unlimited">Unlimited</string>
<string name="not_implemented">This feature is not implemented yet</string>
<string name="copied_to_clipboard">Copied to clipboard</string>
<string name="channel_download">Download</string>
<string name="channel_download_description">Shows download status</string>
<string name="channel_downloader">Downloader</string>
<string name="channel_downloader_description">Shows downloader status</string>
<string name="channel_update">Update</string>
<string name="channel_update_description">Shows update progress</string>
<string name="unable_to_connect">Unable to connect to hitomi.la</string>
<string name="lock_corrupted">Lock file corrupted! Please re-install Pupil</string>
<string name="main_no_result">No result</string>
<string name="unaccessible_download_folder">From Android 11 and above, current Download folder cannot be accessed by outside apps. Would you like to change the download folder?</string>
<string name="notification_denied">Notification permission is required for background downloads. If you deny notifications from this app, in-app update and background download will be disabled.</string>
<string name="main_destination_search">Home</string>
<string name="main_destination_history">History</string>
<string name="main_destination_downloads">Downloads</string>
<string name="main_destination_favorites">Favorites</string>
<string name="main_destination_settings">Settings</string>
<string name="main_destination_image_viewer">Reader</string>
<string name="main_open_navigation_drawer">Open Navigation Drawer</string>
<string name="main_close_navigation_drawer">Close Navigation Drawer</string>
<string name="main_drawer_group_contact_title">Contact</string>
<string name="main_drawer_group_contact_help">Help</string>
<string name="main_drawer_group_contact_homepage">Visit homepage</string>
<string name="main_drawer_group_contact_github">Visit github</string>
<string name="main_drawer_group_contact_email">Email me!</string>
<string name="main_drawer_grouop_contact_discord">Discord</string>
<string name="main_menu_sort">Sort</string>
<string name="main_menu_sort_newest">Newest</string>
<string name="main_menu_sort_popular">Popular</string>
<string name="main_jump_title">Jump to page</string>
<string name="main_jump_message">Current page: %1$d\nMaximum page: %2$d</string>
<string name="main_open_gallery_by_id">Open Gallery by ID</string>
<string name="reader_failed_to_find_gallery">Failed to open gallery</string>
<string name="main_fab_random">Open a random gallery</string>
<string name="main_fab_cancel">Cancel all downloads</string>
<string name="main_move_to_page">Move to page %1$d</string>
<string name="download">Download</string>
<string name="main_delete">DELETE</string>
<string name="doujinshi">Doujinshi</string>
<string name="manga">Manga</string>
<string name="artist_cg">Artist CG</string>
<string name="game_cg">Game CG</string>
<string name="image_set">Image Set</string>
<string name="update_title">Update available</string>
<string name="update_download_completed">Download Completed</string>
<string name="update_download_completed_description">Click here to update</string>
<string name="update_notification_description">Downloading update&#8230;</string>
<string name="update_release_note"># Release Note(v%1$s)\n%2$s</string>
<string name="search_hint">Search galleries</string>
<string name="search_all">Search all galleries</string>
<string name="search_show_histories">Show histories</string>
<string name="search_show_tags">Show favorite tags</string>
<string name="search_add_query_item">Add</string>
<string name="search_add_query_item_tag">Tag</string>
<string name="search_remove_query_item_description">Remove query item</string>
<string name="gallery_details">Details</string>
<string name="gallery_thumbnails">Thumbnails</string>
<string name="gallery_related">Related Galleries</string>
<string name="gallery_artists">Artists</string>
<string name="gallery_groups">Groups</string>
<string name="gallery_language">Language</string>
<string name="gallery_series">Series</string>
<string name="gallery_characters">Characters</string>
<string name="gallery_tags">Tags</string>
<string name="galleryblock_series">Series: %1$s</string>
<string name="galleryblock_type">Type: %1$s</string>
<string name="galleryblock_language">Language: %1$s</string>
<string name="galleryblock_pagecount" translatable="false">%dP</string>
<string name="move_to_page">Move to page %1$d</string>
<!-- SEARCH BAR -->
<string name="search_bar_edit_tag">Touch to edit</string>
<!-- READER -->
<string name="reader_loading">Loading</string>
<string name="reader_go_to_page">Go to page</string>
<string name="reader_fab_fullscreen">Fullscreen</string>>
<string name="reader_fab_retry">Retry</string>
<string name="reader_fab_auto">Scroll with eye blink</string>
<string name="reader_fab_auto_cancel">Stop scroll with eye blink</string>
<string name="reader_fab_download">Background download</string>
<string name="reader_fab_download_cancel">Cancel background download</string>
<string name="reader_notification_text">Downloading&#8230;</string>
<string name="reader_notification_complete">Download complete</string>
<string name="camera_denied">Eye blink detection cannot be used without a permission</string>
<string name="no_camera">There is no front facing camera in this device</string>
<!-- DOWNLOADER -->
<string name="downloader_running">Downloader running…</string>
<!-- SETTINGS -->
<string name="settings_title">Settings</string>
<string name="settings_app_version_title">App version(Click to check update)</string>
<string name="settings_app_version_description">v%s</string>
<string name="settings_beta">Update from beta channel</string>
<!-- SEARCH -->
<string name="settings_search_title">Search Settings</string>
<string name="settings_galleries_per_page">Galleries per page</string>
<string name="settings_default_query">Default query</string>
<!-- SETTINGS/STORAGE -->
<string name="settings_storage">Storage</string>
<!-- SETTINGS/STORAGE / MANAGE STORAGE -->
<string name="settings_manage_storage">Manage Storage</string>
<string name="settings_storage_usage">Currently using %s</string>
<string name="settings_storage_usage_loading">Calculating storage usage…</string>
<string name="settings_clear_cache">Clear cache</string>
<string name="settings_clear_cache_alert_message">Deleting cache can affect image loading speed. Do you want to continue?</string>
<string name="settings_recover_downloads">Reconstruct download database</string>
<string name="settings_clear_downloads">Clear downloads</string>
<string name="settings_clear_downloads_alert_message">Delete all downloaded galleries.\nDo you want to continue?</string>
<string name="settings_clear_history">Clear history</string>
<string name="settings_clear_history_alert_message">Do you want to clear histories?</string>
<string name="settings_clear_history_summary">%1$d histories saved</string>
<!-- SETTINGS/STORAGE / MISCELLANEOUS -->
<string name="settings_download_folder_name">Folder naming pattern</string>
<string name="settings_invalid_download_folder_name">Folder naming pattern is containing invalid characters</string>
<string name="settings_download_folder_name_message">%s will be replaced to its corresponding value\n\n%s</string>
<string name="settings_download_folder">Download folder</string>
<string name="settings_download_folder_removable">Removable Storage</string>
<string name="settings_download_folder_internal">Internal Storage</string>
<string name="settings_download_folder_available">%s available</string>
<string name="settings_download_folder_custom">Custom Location</string>
<string name="settings_download_folder_not_writable">This folder is not writable. Please select another folder.</string>
<string name="settings_cache_limit">Cache Limit</string>
<string name="settings_nomedia_title">Hide image from gallery</string>
<string name="settings_low_quality">Low quality images</string>
<string name="settings_low_quality_summary">Load low quality images to improve load speed and data usage</string>
<!-- SETTINGS/APP LOCK -->
<string name="settings_app_lock">App lock</string>
<string name="settings_app_lock_type">App lock type</string>
<!-- SETTINGS/NETWORKING -->
<string name="settings_networking">Networking</string>
<string name="settings_mirror_summary">Load images from mirrors</string>
<string name="settings_proxy_title">Proxy</string>
<string name="settings_max_concurrent_download">Concurrent Download</string>
<!-- SETTINGS/MISCELLANEOUS -->
<string name="settings_miscellaneous_title">Miscellaneous</string>
<string name="settings_tag_translation">Tag Language</string>
<string name="settings_tag_translation_message">Participate in translation on Github</string>
<string name="settings_rtl">Turn pages Right-to-Left</string>
<string name="settings_security_mode_title">Enable security mode</string>
<string name="settings_security_mode_summary">Enable security mode to make the screen invisible on recent app window</string>
<string name="settings_dark_mode_title">Dark mode</string>
<string name="settings_dark_mode_summary">Protect yourself against light attacks!</string>
<string name="settings_import_old_galleries">Import old galleries</string>
<string name="settings_user_id">User ID</string>
<string name="settings_oss">Open Source Notice</string>
<!-- MANAGE FAVORITES -->
<string name="settings_manage_favorites">Manage favorites</string>
<string name="settings_backup_title">Backup favorites</string>
<string name="settings_backup_failed">Upload Failed</string>
<string name="settings_backup_share">Share Backup</string>
<string name="settings_backup_file_created">Backup file created</string>
<string name="settings_restore_title">Restore favorites</string>
<string name="settings_restore_failed">Restore failed</string>
<string name="settings_restore_success">%1$d entries restored</string>
<!-- SETTINGS/APP LOCK ACTIVITY -->
<string name="settings_lock_none">None</string>
<string name="settings_lock_pattern">Pattern</string>
<string name="settings_lock_pin" translatable="false">PIN</string>
<string name="settings_lock_password">Password</string>
<string name="settings_lock_biometrics">Biometrics</string>
<string name="settings_lock_fingerprint">Fingerprint</string>
<string name="settings_lock_fingerprint_without_lock">Fingerprint can be only enabled if one of the other locks are enabled</string>
<string name="settings_lock_fingerprint_prompt">Pupil Fingerprint Lock™</string>
<string name="settings_lock_enabled">Enabled</string>
<string name="settings_lock_confirm">Input same lock once more to confirm Lock</string>
<string name="settings_lock_remove_message">Do you want to remove lock?</string>
<string name="settings_lock_wrong_confirm">Lock is different from last one. Please try again.</string>
<!-- SETTINGS/DEFAULT QUERY DIALOG -->
<string name="default_query_dialog_title">Set default query</string>
<string name="default_query_dialog_language">Language: </string>
<string name="default_query_dialog_filter_BL">Filter BL</string>
<string name="default_query_dialog_filter_guro">Filter Guro</string>
<string name="default_query_dialog_filter_loli">I\'m not a pedophile</string>
<string name="default_query_dialog_language_selector_none">Any</string>
<string name="settings_mirror_title">Mirrors</string>
<!-- PROXY DIALOG -->
<string name="proxy_dialog_type">type</string>
<string name="proxy_dialog_addr_hint">address</string>
<string name="proxy_dialog_port_hint">port</string>
<string name="proxy_dialog_username_hint">username</string>
<string name="proxy_dialog_password_hint">password</string>
<string name="proxy_dialog_error">Wrong value</string>
<string name="proxy_dialog_server">server</string>
<!-- IMPORT OLD GALLERIES -->
<string name="import_old_galleries_folder_not_readable">This folder is not readable</string>
<string name="import_old_galleries_notification">Importing old galleries…</string>
<string name="import_old_galleries_notification_text" translatable="false">%1$d/%2$d</string>
<string name="import_old_galleries_notification_done">Importing completed</string>
<string name="settings_lock_fingerprint_prompt_subtitle">Ah Shit, Here we go again</string>
<string name="main_menu_thin">Thin Mode</string>
</resources>
+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Pupil, Hitomi.la viewer for Android
~ Copyright (C) 2019 tom5079
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<paths>
<external-path name="external" path="."/>
<external-files-path name="files" path="."/>
<files-path name="files" path="." />
</paths>
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Pupil, Hitomi.la viewer for Android
~ Copyright (C) 2020 tom5079
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="false">10.0.2.2</domain>
</domain-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="false">ix.io</domain>
</domain-config>
</network-security-config>
@@ -0,0 +1,41 @@
/*
* Pupil, Hitomi.la viewer for Android
* Copyright (C) 2019 tom5079
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package xyz.quaver.pupil
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.test.runTest
import org.junit.Test
import xyz.quaver.pupil.networking.HitomiHttpClient
class ExampleUnitTest {
@Test
fun test() = runTest {
val hitomi = HitomiHttpClient()
val result = hitomi.getGalleryIDsFromNozomi(null, "index", "all")
println(result.array())
}
}
+10
View File
@@ -0,0 +1,10 @@
plugins {
alias(libs.plugins.org.jetbrains.kotlin.android) apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.googleServices) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.kotlinx.serialization) apply false
alias(libs.plugins.crashlytics) apply false
}
-46
View File
@@ -1,46 +0,0 @@
# 태그 번역 데이터
태그 데이터는 매일 00:00 UTC에 업데이트 됩니다
## 태그 데이터 번역에 참여하기
### 규칙
* 각 번역 파일은 최상단 폴더에 위치하여야 합니다
* 각 번역 파일의 이름은 다음 형식을 따라야 합니다: [`<ISO 639-1 Code>.json`](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
* 각 번역 파일은 JSON 파일 형식을 따라야 합니다
### 1. 에디터 열기
번역하려는 파일이 존재하지 않으면, 1-1을 참고하세요
번역하려는 파일이 존재한다면, 1-2를 참고하세요
### 1-1. 번역 파일 추가
번역하려는 파일이 존재하지 않으면 새 파일을 추가해야 합니다
1) 우상단 `Create new file` 버튼을 클릭하세요
![](https://github.com/tom5079/Pupil/blob/tags/docs/images/add-file.PNG?raw=true)
2) 규칙에 따라 파일 이름을 지정하세요
![](https://github.com/tom5079/Pupil/blob/tags/docs/images/filename.png?raw=true)
3) [`template.json`](https://raw.githubusercontent.com/tom5079/Pupil/tags/template.json)의 내용물을 전부 붙여넣으세요
### 1-2. 존재하는 파일 수정하기
수정하려는 파일을 열고 우상단 펜 아이콘을 클릭하세요
![](https://github.com/tom5079/Pupil/blob/tags/docs/images/edit-file.png?raw=true)
### 2. 파일 수정하기
화면에 나타나는 파일 편집기에서 파일을 수정하세요
### 3. 파일 변경 요청하기
수정이 완료되었다면, 페이지 아래로 스크롤하여 `Propose changes` 버튼을 누르세요
별다른 커밋 메세지는 추가하지 않아도 됩니다
![](https://github.com/tom5079/Pupil/blob/tags/docs/images/propose-changes.png?raw=true)
수정사항은 리뷰 후 적용됩니다
Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Some files were not shown because too many files have changed in this diff Show More