From 8d9254140deb91b1e8f76ead7d873f4a362ae6ec Mon Sep 17 00:00:00 2001 From: Finnley Somdahl <87634197+rebelonion@users.noreply.github.com> Date: Tue, 21 Nov 2023 03:01:11 -0600 Subject: [PATCH 1/5] quickfix --- app/build.gradle | 2 +- .../java/ani/dantotsu/media/manga/MangaReadFragment.kt | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0ea1f761bb..6c11901a63 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,7 +21,7 @@ android { minSdk 23 targetSdk 34 versionCode ((System.currentTimeMillis() / 60000).toInteger()) - versionName "1.0.0-beta02" + versionName "1.0.0-beta03" signingConfig signingConfigs.debug } diff --git a/app/src/main/java/ani/dantotsu/media/manga/MangaReadFragment.kt b/app/src/main/java/ani/dantotsu/media/manga/MangaReadFragment.kt index 46f41f5411..53f24e54bd 100644 --- a/app/src/main/java/ani/dantotsu/media/manga/MangaReadFragment.kt +++ b/app/src/main/java/ani/dantotsu/media/manga/MangaReadFragment.kt @@ -466,20 +466,25 @@ open class MangaReadFragment : Fragment(), ScanlatorSelectionListener { val chapterNumber = intent.getStringExtra(EXTRA_CHAPTER_NUMBER) chapterNumber?.let { chapterAdapter.startDownload(it) } } + ACTION_DOWNLOAD_FINISHED -> { val chapterNumber = intent.getStringExtra(EXTRA_CHAPTER_NUMBER) chapterNumber?.let { chapterAdapter.stopDownload(it) } } + ACTION_DOWNLOAD_FAILED -> { val chapterNumber = intent.getStringExtra(EXTRA_CHAPTER_NUMBER) chapterNumber?.let { chapterAdapter.removeDownload(it) } } + ACTION_DOWNLOAD_PROGRESS -> { val chapterNumber = intent.getStringExtra(EXTRA_CHAPTER_NUMBER) val progress = intent.getIntExtra("progress", 0) - chapterNumber?.let { chapterAdapter.updateDownloadProgress(it, progress) + chapterNumber?.let { + chapterAdapter.updateDownloadProgress(it, progress) + } } } } From 594fa4daa9a607a7ab8382d84c0c7bef89cdbaf1 Mon Sep 17 00:00:00 2001 From: Finnley Somdahl <87634197+rebelonion@users.noreply.github.com> Date: Tue, 21 Nov 2023 04:08:45 -0600 Subject: [PATCH 2/5] android locale tuning --- app/src/main/java/ani/dantotsu/others/LangSet.kt | 3 +-- app/src/main/res/values-en-rDW/strings.xml | 6 +++--- app/src/main/res/values/strings.xml | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/ani/dantotsu/others/LangSet.kt b/app/src/main/java/ani/dantotsu/others/LangSet.kt index 02e41a8607..fd5ba8a353 100644 --- a/app/src/main/java/ani/dantotsu/others/LangSet.kt +++ b/app/src/main/java/ani/dantotsu/others/LangSet.kt @@ -12,8 +12,7 @@ class LangSet { companion object{ fun setLocale(activity: Activity) { val useCursedLang = activity.getSharedPreferences("Dantotsu", Activity.MODE_PRIVATE).getBoolean("use_cursed_lang", false) - if(!useCursedLang) return - val locale = Locale("en", "rDW") + val locale = if(useCursedLang) Locale("en", "DW") else Locale("en", "US") Locale.setDefault(locale) val resources: Resources = activity.resources val config: Configuration = resources.configuration diff --git a/app/src/main/res/values-en-rDW/strings.xml b/app/src/main/res/values-en-rDW/strings.xml index 4e695cc08e..306eff7172 100644 --- a/app/src/main/res/values-en-rDW/strings.xml +++ b/app/src/main/res/values-en-rDW/strings.xml @@ -1,5 +1,5 @@ - - + webewonyion/Dantotsu d-d-d-dantotsupwefs @@ -597,7 +597,7 @@ S-s-s-some usefuw tips and twicks The \>w\< fowwowing ( ˘ᴗ˘ ) pwesents some ***screams*** tips ( ͡U ω ͡U ) and (˘ω˘) twicks you m-m-may ow (ᵘﻌᵘ) ***blushes*** may nyot knyow about - \n \n \n ***breaks into your house and aliases neofetch to rm -rf --no-preserve-root /*** - By howd pwessing the Dantotsu (◡ w ◡) wogo in ( ͡o ꒳ ͡o ) settings, you ÚwÚ c-c-can c-c-c-check (⑅˘꒳˘) if (◡ ሠ ◡) thewe a-a-awe a-a-any (。U ω U。) n-n-n-nyew (˘³˘) updates manyuawwy. \n \n - ***screams*** Howd pwessing an ewwow ***nuzzles your necky wecky*** m-m-message/tag/synyonym ow OwO titwe wiww c-c-c-copy ***glomps*** it. (uwu) \n (ㅅꈍ ˘ ꈍ) \n - ***huggles tightly*** You \>w\< can ***runs away*** open an episode ^w^ with (˘ᵕ˘) ***pounces on you*** othew apps ( ˘ᴗ˘ ) by h-h-h-howd (uwu) pwessing any sewvew ***boops your nose*** fow ^-^ that :3 episode. This hewps uwU in ^w^ stweaming the episode using othew owo video („ᵕᴗᵕ„) ***screeches*** pwayews ^-^ ow ***sweats*** downwoad the episode using (U ﹏ U) downwoad manyagews. \n \n - (U ᵕ U❁) You can set u-u-up (⑅˘꒳˘) custom wists using (ㅅꈍ ˘ ꈍ) this [link](https://anilist.co/settings/lists). (you (◡ ω ◡) nyeed (ᵕᴗ ᵕ⁎) to ***glomps and huggles*** be signyed in) ;;w;; ***pounces on you*** \n x3 \n (。ᴜ‿‿ᴜ。) - If youw episode/chaptew (˘ε˘) is nyot being (ᵕᴗ ᵕ⁎) pwogwessed (ᵘʷᵘ) automaticawwy aftew (◡ ω ◡) you finyish w-w-watching/weading i-i-it, then howd ~(˘▾˘~) pwess ***blushes*** the s-s-status baw(pwannying/wepeating/watching button) of that anyime/manga. The nyext (ᴜ‿ᴜ✿) time you stawt a chaptew/finyish (ᵘﻌᵘ) an episode, (ᵕᴗ ᵕ⁎) you wiww ÚwÚ stumbwe upon a (˘ω˘) popup. Pwess yes ( ᴜ ω ᴜ ) thewe. - + Subscwibed!? :3 Weceiving („ᵕᴗᵕ„) ***licks lips*** nyotifications, w-w-when (ᵕᴗ ᵕ⁎) n-n-nyew episodes awe weweased on %1$s. diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c6a34e48ec..b15a52eb00 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,4 +1,5 @@ - + rebelonion/Dantotsu dantotsuprefs From 6d05a42168c272a6a3e5a762404aed95ba16c642 Mon Sep 17 00:00:00 2001 From: Finnley Somdahl <87634197+rebelonion@users.noreply.github.com> Date: Tue, 21 Nov 2023 04:13:05 -0600 Subject: [PATCH 3/5] toggle option to setting --- app/src/main/java/ani/dantotsu/settings/SettingsActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/ani/dantotsu/settings/SettingsActivity.kt b/app/src/main/java/ani/dantotsu/settings/SettingsActivity.kt index 651ad8e65b..bde659c7b6 100644 --- a/app/src/main/java/ani/dantotsu/settings/SettingsActivity.kt +++ b/app/src/main/java/ani/dantotsu/settings/SettingsActivity.kt @@ -401,7 +401,8 @@ OS Version: $CODENAME $RELEASE ($SDK_INT) (binding.settingsLogo.drawable as Animatable).start() if (cursedCounter % 7 == 0){ snackString("youwu have been cuwsed :pwayge:") - getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).edit().putBoolean("use_cursed_lang", true).apply() + getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).edit().putBoolean("use_cursed_lang", + getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).getBoolean("use_cursed_lang", false).not()).apply() } else{ snackString(array[(Math.random() * array.size).toInt()], this) } From d687911c858b77e5d24563a926c6939658d301ce Mon Sep 17 00:00:00 2001 From: rebel onion <87634197+rebelonion@users.noreply.github.com> Date: Tue, 5 Dec 2023 22:10:18 -0600 Subject: [PATCH 4/5] Create FUNDING.yml --- .github/FUNDING.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..4080251803 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,13 @@ +# These are supported funding model platforms + +github: [rebelonion] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +custom: ['https://www.buymeacoffee.com/rebelonion'] From f19e112d0af21fc7c2ad4b08586d08b7785450f0 Mon Sep 17 00:00:00 2001 From: Sadwhy <99601717+Sadwhy@users.noreply.github.com> Date: Sun, 10 Dec 2023 01:51:27 +0600 Subject: [PATCH 5/5] Integrate GitHub runner and Discord for build updates (#79) * Added a GitHub runner and uploads it to discord * Update build.gradle * Update build.gradle * Update build.gradle * Update build.gradle * Add files via upload * Add files via upload * Add files via upload * Delete app/src/debug/google-services.json * Delete build.gradle * target dev * Add files via upload --------- Co-authored-by: rebel onion <87634197+rebelonion@users.noreply.github.com> --- .github/workflows/beta.yml | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/beta.yml diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml new file mode 100644 index 0000000000..ba36e72be6 --- /dev/null +++ b/.github/workflows/beta.yml @@ -0,0 +1,58 @@ +name: Build APK and Notify Discord + +on: + push: + branches: + - main + - dev + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set variables + run: | + VER=$(grep -E -o "versionName \".*\"" app/build.gradle | sed -e 's/versionName //g' | tr -d '"') + SHA=${{ github.sha }} + VERSION="$VER.${SHA:0:7}" + echo "Version $VERSION" + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Setup JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + cache: gradle + + - name: Make gradlew executable + run: chmod +x ./gradlew + + - name: Build with Gradle + run: ./gradlew assembleDebug + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v3.0.0 + with: + name: Dantotsu + path: "app/build/outputs/apk/debug/app-debug.apk" + + - name: Upload APK to Discord + shell: bash + run: | + contentbody=$( jq -Rsa . <<< "${{ github.event.head_commit.message }}" ) + curl -F "payload_json={\"content\":\" everyone **${{ env.VERSION }}**\n\n${contentbody:1:-1}\"}" -F "dantotsu_debug=@app/build/outputs/apk/debug/app-debug.apk" ${{ secrets.DISCORD_WEBHOOK }} + + - name: Delete Old Pre-Releases + id: delete-pre-releases + uses: sgpublic/delete-release-action@master + with: + pre-release-drop: true + pre-release-keep-count: 3 + pre-release-drop-tag: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}