Skip to content

Commit

Permalink
fix app shortcuts (#557)
Browse files Browse the repository at this point in the history
* fix app shortcuts

* remove zellius
  • Loading branch information
cuong-tran authored Dec 23, 2024
1 parent 047bfdc commit edb97f7
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 9 deletions.
3 changes: 0 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ plugins {
id("mihon.android.application.compose")
kotlin("plugin.parcelize")
kotlin("plugin.serialization")
// id("com.github.zellius.shortcut-helper")
alias(libs.plugins.aboutLibraries)
id("com.github.ben-manes.versions")
}
Expand All @@ -23,8 +22,6 @@ if (gradle.startParameter.taskRequests.toString().contains("Standard")) {
}
}

// shortcutHelper.setFilePath("./shortcuts.xml")

val supportedAbis = setOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")

android {
Expand Down
50 changes: 50 additions & 0 deletions app/src/beta/res/xml/shortcuts.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:enabled="true"
android:icon="@drawable/sc_collections_bookmark_48dp"
android:shortcutDisabledMessage="@string/app_not_available"
android:shortcutId="show_library"
android:shortcutLongLabel="@string/label_library"
android:shortcutShortLabel="@string/label_library">
<intent
android:action="eu.kanade.tachiyomi.SHOW_LIBRARY"
android:targetPackage="app.komikku.beta"
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
</shortcut>
<shortcut
android:enabled="true"
android:icon="@drawable/sc_new_releases_48dp"
android:shortcutDisabledMessage="@string/app_not_available"
android:shortcutId="show_recently_updated"
android:shortcutLongLabel="@string/label_recent_updates"
android:shortcutShortLabel="@string/label_recent_updates">
<intent
android:action="eu.kanade.tachiyomi.SHOW_RECENTLY_UPDATED"
android:targetPackage="app.komikku.beta"
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
</shortcut>
<shortcut
android:enabled="true"
android:icon="@drawable/sc_history_48dp"
android:shortcutDisabledMessage="@string/app_not_available"
android:shortcutId="show_recently_read"
android:shortcutLongLabel="@string/label_recent_manga"
android:shortcutShortLabel="@string/label_recent_manga">
<intent
android:action="eu.kanade.tachiyomi.SHOW_RECENTLY_READ"
android:targetPackage="app.komikku.beta"
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
</shortcut>
<shortcut
android:enabled="true"
android:icon="@drawable/sc_explore_48dp"
android:shortcutDisabledMessage="@string/app_not_available"
android:shortcutId="show_catalogues"
android:shortcutLongLabel="@string/browse"
android:shortcutShortLabel="@string/browse">
<intent
android:action="eu.kanade.tachiyomi.SHOW_CATALOGUES"
android:targetPackage="app.komikku.beta"
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
</shortcut>
</shortcuts>
8 changes: 4 additions & 4 deletions app/src/main/res/xml/shortcuts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
android:shortcutShortLabel="@string/label_library">
<intent
android:action="eu.kanade.tachiyomi.SHOW_LIBRARY"
android:targetPackage="eu.kanade.tachiyomi.sy"
android:targetPackage="app.komikku"
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
</shortcut>
<shortcut
Expand All @@ -20,7 +20,7 @@
android:shortcutShortLabel="@string/label_recent_updates">
<intent
android:action="eu.kanade.tachiyomi.SHOW_RECENTLY_UPDATED"
android:targetPackage="eu.kanade.tachiyomi.sy"
android:targetPackage="app.komikku"
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
</shortcut>
<shortcut
Expand All @@ -32,7 +32,7 @@
android:shortcutShortLabel="@string/label_recent_manga">
<intent
android:action="eu.kanade.tachiyomi.SHOW_RECENTLY_READ"
android:targetPackage="eu.kanade.tachiyomi.sy"
android:targetPackage="app.komikku"
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
</shortcut>
<shortcut
Expand All @@ -44,7 +44,7 @@
android:shortcutShortLabel="@string/browse">
<intent
android:action="eu.kanade.tachiyomi.SHOW_CATALOGUES"
android:targetPackage="eu.kanade.tachiyomi.sy"
android:targetPackage="app.komikku"
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
</shortcut>
</shortcuts>
1 change: 0 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ firebase-bom = "33.7.0"

[libraries]
desugar = "com.android.tools:desugar_jdk_libs:2.1.4"
android-shortcut-gradle = "com.github.zellius:android-shortcut-gradle-plugin:0.1.2"

rxjava = "io.reactivex:rxjava:1.3.8"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class BaselineProfileGenerator {

@Test
fun generate() = baselineProfileRule.collect(
packageName = "eu.kanade.tachiyomi.sy.benchmark",
packageName = "app.komikku.benchmark",
profileBlock = {
pressHome()
startActivityAndWait()
Expand Down

0 comments on commit edb97f7

Please sign in to comment.