Skip to content
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Kiwix requires the following permissions to fully work:

## Build instructions
1. Clone [this repository](https://github.com/kiwix/kiwix-android).
2. Import the project with [Android Studio Narwhal Canary build](https://developer.android.com/studio/preview).
2. Import the project with [Android Studio](https://developer.android.com/studio).
3. Set the Gradle JDK to Java 17.
4. Run ./gradlew build from the root directory.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2232,10 +2232,6 @@ abstract class CoreReaderFragment :
private fun saveTabStates(onComplete: () -> Unit = {}) {
CoroutineScope(Dispatchers.Main).launch {
savingTabsMutex.withLock {
// clear the previous history saved in database
withContext(Dispatchers.IO) {
repositoryActions?.clearWebViewPageHistory()
}
val coreApp = sharedPreferenceUtil?.context as CoreApp
val settings = coreApp.getSharedPreferences(
SharedPreferenceUtil.PREF_KIWIX_MOBILE,
Expand All @@ -2247,6 +2243,9 @@ abstract class CoreReaderFragment :
getWebViewHistoryEntity(view, index)?.let(webViewHistoryEntityList::add)
}
withContext(Dispatchers.IO) {
// clear the previous history saved in database
repositoryActions?.clearWebViewPageHistory()
// Store new history in database.
repositoryActions?.saveWebViewPageHistory(webViewHistoryEntityList)
}
settings.edit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,9 @@ class SearchFragmentTestForCustomApp {
clickOnHomeButton(composeTestRule)
// click on an article to load the other page.
clickOnAFoolForYouArticle(composeTestRule)
composeTestRule.mainClock.advanceTimeByFrame()
assertAFoolForYouArticleLoaded(composeTestRule)
composeTestRule.waitUntilTimeout()
// open note screen.
openNoteFragment(customMainActivity as CoreMainActivity, composeTestRule)
composeTestRule.waitUntilTimeout()
Expand Down