From 2e9ac85c450781422a6a34085a7644873a654184 Mon Sep 17 00:00:00 2001 From: Sean Mac Gillicuddy Date: Wed, 11 Dec 2019 09:48:31 +0000 Subject: [PATCH 1/4] #1632 Categories/Tags in Download Books present with no tag data --- .../fileselect_view/adapter/BooksOnDiskViewHolder.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/zim_manager/fileselect_view/adapter/BooksOnDiskViewHolder.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/zim_manager/fileselect_view/adapter/BooksOnDiskViewHolder.kt index 4ece39d0d..ec38b94a6 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/zim_manager/fileselect_view/adapter/BooksOnDiskViewHolder.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/zim_manager/fileselect_view/adapter/BooksOnDiskViewHolder.kt @@ -19,8 +19,6 @@ package org.kiwix.kiwixmobile.core.zim_manager.fileselect_view.adapter import android.view.View -import android.view.View.GONE -import android.view.View.VISIBLE import kotlinx.android.synthetic.main.header_language.header_language import kotlinx.android.synthetic.main.item_book.itemBookCheckbox import kotlinx.android.synthetic.main.item_book.item_book_article_count @@ -71,7 +69,7 @@ sealed class BookOnDiskViewHolder(containerView: Vie item_book_icon.setBitmap(Base64String(book.favicon)) - tags.visibility == if (item.tags.isEmpty()) GONE else VISIBLE + tags.visibility = if (item.tags.isEmpty()) View.GONE else View.VISIBLE tags.render(item.tags) itemBookCheckbox.isChecked = item.isSelected From da9befd51310037a0b7d28a31600b3e88b164c5b Mon Sep 17 00:00:00 2001 From: Sean Mac Gillicuddy Date: Wed, 11 Dec 2019 10:12:23 +0000 Subject: [PATCH 2/4] #1634 App becomes unresponsive in the library - add permission back --- app/src/main/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e51f66b2e..c12ccec27 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,6 +3,7 @@ package="org.kiwix.kiwixmobile"> + Date: Wed, 11 Dec 2019 10:34:07 +0000 Subject: [PATCH 3/4] #1633 No local ZIM files get listed during first start after installation - request files on permission granted --- .../kiwix/kiwixmobile/core/main/CoreMainActivity.java | 11 ++--------- .../org/kiwix/kiwixmobile/core/utils/Constants.java | 2 -- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreMainActivity.java b/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreMainActivity.java index dab081797..1b733e837 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreMainActivity.java +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreMainActivity.java @@ -128,7 +128,6 @@ import static org.kiwix.kiwixmobile.core.utils.Constants.EXTRA_ZIM_FILE; import static org.kiwix.kiwixmobile.core.utils.Constants.REQUEST_FILE_SELECT; import static org.kiwix.kiwixmobile.core.utils.Constants.REQUEST_HISTORY_ITEM_CHOSEN; import static org.kiwix.kiwixmobile.core.utils.Constants.REQUEST_PREFERENCES; -import static org.kiwix.kiwixmobile.core.utils.Constants.REQUEST_READ_STORAGE_PERMISSION; import static org.kiwix.kiwixmobile.core.utils.Constants.REQUEST_STORAGE_PERMISSION; import static org.kiwix.kiwixmobile.core.utils.Constants.REQUEST_WRITE_STORAGE_PERMISSION_ADD_NOTE; import static org.kiwix.kiwixmobile.core.utils.Constants.RESULT_HISTORY_CLEARED; @@ -1090,15 +1089,9 @@ public abstract class CoreMainActivity extends BaseActivity if (file != null) { openZimFile(file); } - } - break; - } - - case REQUEST_READ_STORAGE_PERMISSION: { - if (grantResults.length > 0 - && grantResults[0] == PERMISSION_GRANTED) { scanStorageForZims(); - } else { + } + else { Snackbar.make(snackbarRoot, R.string.request_storage, Snackbar.LENGTH_LONG) .setAction(R.string.menu_settings, view -> { Intent intent = new Intent(); diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/utils/Constants.java b/core/src/main/java/org/kiwix/kiwixmobile/core/utils/Constants.java index b789d54ae..f48db7b6d 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/utils/Constants.java +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/utils/Constants.java @@ -27,8 +27,6 @@ public final class Constants { public static final int REQUEST_STORAGE_PERMISSION = 1; - public static final int REQUEST_READ_STORAGE_PERMISSION = 2; - public static final int REQUEST_WRITE_STORAGE_PERMISSION_ADD_NOTE = 3; public static final int REQUEST_HISTORY_ITEM_CHOSEN = 99; From 8ec8bd95e79d7efa045d85e74a4761a789aac6e1 Mon Sep 17 00:00:00 2001 From: Sean Mac Gillicuddy Date: Wed, 11 Dec 2019 14:52:28 +0000 Subject: [PATCH 4/4] Up version for 3.1.1 --- app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 6e358aa99..dfb99a18f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -11,7 +11,7 @@ apply(from = rootProject.file("jacoco.gradle")) ext { set("versionMajor", 3) set("versionMinor", 1) - set("versionPatch", 0) + set("versionPatch", 1) } fun generateVersionName() = "${ext["versionMajor"]}.${ext["versionMinor"]}.${ext["versionPatch"]}"