diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index ad6f5da2..6c01f4ac 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -16,9 +16,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Setup
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
@@ -28,9 +28,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Setup
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
@@ -46,7 +46,7 @@ jobs:
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: ./gradlew clean assembleRelease --stacktrace
- name: Save apk
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: apk
path: /home/runner/work/unchained-android/unchained-android/app/app/build/outputs/apk/release/*.apk
@@ -54,9 +54,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Setup
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
@@ -72,7 +72,7 @@ jobs:
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: ./gradlew clean assembleDebug --stacktrace
- name: Save apk
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: apk-debug
path: /home/runner/work/unchained-android/unchained-android/app/app/build/outputs/apk/debug/*.apk
diff --git a/app/app/build.gradle b/app/app/build.gradle
index 151d77ff..be9ddc85 100644
--- a/app/app/build.gradle
+++ b/app/app/build.gradle
@@ -54,8 +54,8 @@ android {
applicationId "com.github.livingwithhippos.unchained"
minSdk 22
targetSdk 34
- versionCode 42
- versionName "1.2.0"
+ versionCode 43
+ versionName "1.2.1"
// limit resources for a list of locales
// resConfigs "en", "it"
diff --git a/app/app/src/main/java/com/github/livingwithhippos/unchained/settings/view/SettingsFragment.kt b/app/app/src/main/java/com/github/livingwithhippos/unchained/settings/view/SettingsFragment.kt
index 0742c0bc..a570c6d4 100644
--- a/app/app/src/main/java/com/github/livingwithhippos/unchained/settings/view/SettingsFragment.kt
+++ b/app/app/src/main/java/com/github/livingwithhippos/unchained/settings/view/SettingsFragment.kt
@@ -134,6 +134,9 @@ class SettingsFragment : PreferenceFragmentCompat() {
context?.showToast(R.string.user_logged_out)
activity?.finishAffinity()
}
+ SettingEvent.LogoutNoCredentials -> {
+ context?.showToast(R.string.no_credentials_found)
+ }
null -> {
// do nothing
}
diff --git a/app/app/src/main/java/com/github/livingwithhippos/unchained/settings/viewmodel/SettingsViewModel.kt b/app/app/src/main/java/com/github/livingwithhippos/unchained/settings/viewmodel/SettingsViewModel.kt
index a98670c0..14a59c3a 100644
--- a/app/app/src/main/java/com/github/livingwithhippos/unchained/settings/viewmodel/SettingsViewModel.kt
+++ b/app/app/src/main/java/com/github/livingwithhippos/unchained/settings/viewmodel/SettingsViewModel.kt
@@ -58,12 +58,19 @@ constructor(
fun userLogout() {
viewModelScope.launch {
- protoStore.deleteCredentials()
- eventLiveData.postEvent(SettingEvent.Logout)
+ val credentials = protoStore.getCredentials()
+ if (credentials.accessToken.isBlank() && credentials.clientId.isBlank()) {
+ eventLiveData.postEvent(SettingEvent.LogoutNoCredentials)
+ } else {
+ protoStore.deleteCredentials()
+ eventLiveData.postEvent(SettingEvent.Logout)
+ }
}
}
}
sealed class SettingEvent {
- object Logout : SettingEvent()
+ data object Logout : SettingEvent()
+
+ data object LogoutNoCredentials : SettingEvent()
}
diff --git a/app/app/src/main/res/layout/fragment_torrent_details.xml b/app/app/src/main/res/layout/fragment_torrent_details.xml
index 1ec8bb0d..e5e8d2aa 100644
--- a/app/app/src/main/res/layout/fragment_torrent_details.xml
+++ b/app/app/src/main/res/layout/fragment_torrent_details.xml
@@ -79,7 +79,7 @@
app:srcCompat="@drawable/icon_share" />
Utiliza servicios como Jackett, Prowlarr o cualquier app de Torznab.
todos
Opciones de búsqueda
+ No se han encontrado credenciales
diff --git a/app/app/src/main/res/values-fr/strings.xml b/app/app/src/main/res/values-fr/strings.xml
index 92527fe5..1164795d 100644
--- a/app/app/src/main/res/values-fr/strings.xml
+++ b/app/app/src/main/res/values-fr/strings.xml
@@ -524,4 +524,5 @@
Utilisez des services tels que Jackett, Prowlarr ou toute autre application Torznab.
tous
Options de recherche
+ Aucun justificatif n\'a été trouvé
diff --git a/app/app/src/main/res/values-it/strings.xml b/app/app/src/main/res/values-it/strings.xml
index db5a40cb..d5cc3b8b 100644
--- a/app/app/src/main/res/values-it/strings.xml
+++ b/app/app/src/main/res/values-it/strings.xml
@@ -527,4 +527,5 @@
Utilizza servizi come Jackett, Prowlarr o qualunque server Torznab.
tutti
Opzioni ricerca
+ Nessuna credenziale trovata
\ No newline at end of file
diff --git a/app/app/src/main/res/values/strings.xml b/app/app/src/main/res/values/strings.xml
index 910bfed8..db43bfe4 100644
--- a/app/app/src/main/res/values/strings.xml
+++ b/app/app/src/main/res/values/strings.xml
@@ -740,4 +740,5 @@
Use services such as Jackett, Prowlarr or any Torznab app.
all
Search Options
+ No credentials found
\ No newline at end of file
diff --git a/app/app/src/main/res/xml/settings.xml b/app/app/src/main/res/xml/settings.xml
index e1abf778..0ccb5e52 100644
--- a/app/app/src/main/res/xml/settings.xml
+++ b/app/app/src/main/res/xml/settings.xml
@@ -2,12 +2,6 @@
-
-
-
@@ -33,14 +27,13 @@
+ app:summary="@string/summary_loading_size"
+ app:title="@string/loading_size" />
+ app:title="@string/install_plugins" />
-
+
+ app:useSimpleSummaryProvider="true" />
@@ -227,6 +216,10 @@
+
+