Skip to content

Commit

Permalink
Merge pull request #3567 from kiwix/develop
Browse files Browse the repository at this point in the history
3.8.1 branch
  • Loading branch information
kelson42 authored Dec 2, 2023
2 parents 4929c5a + 6a6706c commit f6d86fb
Show file tree
Hide file tree
Showing 14 changed files with 187 additions and 44 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
name: Publish App

on:
push:
branches-ignore:
- '*'
- '*/**'
tags:
- '*'
- '*/**'
release:
types: [published]

jobs:
publish:
Expand All @@ -32,19 +27,17 @@ jobs:
echo "$SSH_KEY" | base64 -d > ssh_key
chmod 600 ssh_key
- name: Set tag variable
run: echo "TAG=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV

- name: Publish APK to download.kiwix.org
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
UNIVERSAL_RELEASE_APK: app/build/outputs/apk/release/*universal*.apk
ARCHIVE_NAME: kiwix-${{ github.event.release.tag_name }}.apk
run: |
./gradlew assembleRelease
cp $UNIVERSAL_RELEASE_APK kiwix-${TAG}.apk
scp -P 30022 -vrp -i ssh_key -o StrictHostKeyChecking=no kiwix-${TAG}.apk ci@master.download.kiwix.org:/data/download/release/kiwix-android/
cp "$UNIVERSAL_RELEASE_APK" "$ARCHIVE_NAME"
scp -P 30022 -vrp -i ssh_key -o StrictHostKeyChecking=no "$ARCHIVE_NAME" ci@master.download.kiwix.org:/data/download/release/kiwix-android/
# This is temporary, once we will publish 3.7.0 then we will uncommented this code.
# # This is necessary for F-Droid
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
3.8.1
Bug Fixes:
* Application crash occurring when users rapidly typed during a search for an entry. (https://github.com/kiwix/kiwix-android/pull/3558)
* Play Store deep linking issue on Android 12 and above. (https://github.com/kiwix/kiwix-android/pull/3550)

3.8.0
New Features:
* Download pause/resume feature. (https://github.com/kiwix/kiwix-android/pull/3459)
Expand Down
45 changes: 23 additions & 22 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="content" />
<data android:mimeType="application/octet-stream" />
Expand All @@ -52,10 +53,10 @@

<data android:scheme="file" />
<data android:mimeType="*/*" />
<data android:pathPattern=".*\\.zim" />
<data android:pathPattern=".*\\..*\\.zim" />
<data android:pathPattern=".*\\..*\\..*\\.zim" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.zim" />
<data android:pathPattern="/.*\\.zim" />
<data android:pathPattern="/.*\\..*\\.zim" />
<data android:pathPattern="/.*\\..*\\..*\\.zim" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\.zim" />
<data android:host="*" />
</intent-filter>
<intent-filter>
Expand All @@ -66,37 +67,37 @@

<data android:scheme="file" />
<data android:mimeType="*/*" />
<data android:pathPattern=".*\\.zimaa" />
<data android:pathPattern=".*\\..*\\.zimaa" />
<data android:pathPattern=".*\\..*\\..*\\.zimaa" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.zimaa" />
<data android:pathPattern="/.*\\.zimaa" />
<data android:pathPattern="/.*\\..*\\.zimaa" />
<data android:pathPattern="/.*\\..*\\..*\\.zimaa" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\.zimaa" />
<data android:host="*" />
</intent-filter>
<intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="http" />
<data android:host="*" />
<data android:pathPattern=".*\\.zim(aa|)" />
<data android:pathPattern=".*\\..*\\.zim(aa|)" />
<data android:pathPattern=".*\\..*\\..*\\.zim(aa|)" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.zim(aa|)" />
<data android:pathPattern="/.*\\.zim(aa|)" />
<data android:pathPattern="/.*\\..*\\.zim(aa|)" />
<data android:pathPattern="/.*\\..*\\..*\\.zim(aa|)" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\.zim(aa|)" />
</intent-filter>
<intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="https" />
<data android:host="*" />
<data android:pathPattern=".*\\.zim(aa|)" />
<data android:pathPattern=".*\\..*\\.zim(aa|)" />
<data android:pathPattern=".*\\..*\\..*\\.zim(aa|)" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.zim(aa|)" />
<data android:pathPattern="/.*\\.zim(aa|)" />
<data android:pathPattern="/.*\\..*\\.zim(aa|)" />
<data android:pathPattern="/.*\\..*\\..*\\.zim(aa|)" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\.zim(aa|)" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
Expand All @@ -106,10 +107,10 @@

<data android:scheme="content" />
<data android:host="*" />
<data android:pathPattern=".*\\.zim(aa|)" />
<data android:pathPattern=".*\\..*\\.zim(aa|)" />
<data android:pathPattern=".*\\..*\\..*\\.zim(aa|)" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.zim(aa|)" />
<data android:pathPattern="/.*\\.zim(aa|)" />
<data android:pathPattern="/.*\\..*\\.zim(aa|)" />
<data android:pathPattern="/.*\\..*\\..*\\.zim(aa|)" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\.zim(aa|)" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-in/strings.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Authors:
* Esiahaan
* Veracious
-->
<resources>
<string name="file_system_does_not_support_4gb">Sistem file Anda tidak mendukung file berukuran lebih dari 4GB</string>
<string name="detecting_file_system">Mendeteksi apakah sistem file dapat membuat file berukuran 4GB</string>
<string name="receive_files_title">Terima Berkas</string>
</resources>
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ object Config {
// Version Information
const val versionMajor = 3 // Major version component of the app's version name and version code.
const val versionMinor = 8 // Minor version component of the app's version name and version code.
const val versionPatch = 0 // Patch version component of the app's version name and version code.
const val versionPatch = 1 // Patch version component of the app's version name and version code.
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ import org.kiwix.kiwixmobile.core.search.viewmodel.Action
import org.kiwix.kiwixmobile.core.search.viewmodel.Action.ActivityResultReceived
import org.kiwix.kiwixmobile.core.search.viewmodel.Action.ClickedSearchInText
import org.kiwix.kiwixmobile.core.search.viewmodel.Action.ExitedSearch
import org.kiwix.kiwixmobile.core.search.viewmodel.Action.Filter
import org.kiwix.kiwixmobile.core.search.viewmodel.Action.OnItemClick
import org.kiwix.kiwixmobile.core.search.viewmodel.Action.OnItemLongClick
import org.kiwix.kiwixmobile.core.search.viewmodel.Action.OnOpenInNewTabClick
Expand Down Expand Up @@ -219,7 +218,7 @@ class SearchFragment : BaseFragment() {
searchView?.setOnQueryTextListener(
SimpleTextListener {
if (it.isNotEmpty()) {
searchViewModel.actions.trySend(Filter(it)).isSuccess
searchViewModel.searchResults(it)
}
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import kotlinx.coroutines.channels.trySendBlocking
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asFlow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.debounce
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.mapLatest
import kotlinx.coroutines.flow.receiveAsFlow
import kotlinx.coroutines.launch
Expand Down Expand Up @@ -65,6 +67,8 @@ import org.kiwix.kiwixmobile.core.search.viewmodel.effects.StartSpeechInput
import org.kiwix.libzim.SuggestionSearch
import javax.inject.Inject

const val DEBOUNCE_DELAY = 500L

@OptIn(ExperimentalCoroutinesApi::class)
class SearchViewModel @Inject constructor(
private val recentSearchDao: NewRecentSearchDao,
Expand All @@ -88,10 +92,24 @@ class SearchViewModel @Inject constructor(
val actions = Channel<Action>(Channel.UNLIMITED)
private val filter = ConflatedBroadcastChannel("")
private val searchOrigin = ConflatedBroadcastChannel(FromWebView)
private val debouncedSearchQuery = MutableStateFlow("")

init {
viewModelScope.launch { reducer() }
viewModelScope.launch { actionMapper() }
viewModelScope.launch { debouncedSearchQuery() }
}

private suspend fun debouncedSearchQuery() {
// Observe and collect the debounced search query
debouncedSearchQuery
// Applying debouncing to delay the emission of consecutive search queries
.debounce(DEBOUNCE_DELAY)
// Ensuring that only distinct search queries are processed
.distinctUntilChanged()
.collect { query ->
actions.trySend(Filter(query)).isSuccess
}
}

@Suppress("DEPRECATION")
Expand Down Expand Up @@ -201,6 +219,10 @@ class SearchViewModel @Inject constructor(
}, LATEST)
.subscribeOn(Schedulers.io())
}

fun searchResults(query: String) {
debouncedSearchQuery.value = query
}
}

data class SearchResultsWithTerm(val searchTerm: String, val suggestionSearch: SuggestionSearch?)
3 changes: 2 additions & 1 deletion core/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* FF-11
* FF11
* Falwye
* Fw
* IMayBeABitShy
* Justman10000
* Killarnee
Expand Down Expand Up @@ -164,7 +165,7 @@
<string name="confirm_stop_download_msg">Sind Sie sicher, dass Sie diesen Download abbrechen möchten?</string>
<string name="download_change_storage">Speichergeräteauswahl</string>
<string name="tts_not_enabled">Die Vorlesefunktion ist für diese ZIM-Datei nicht aktiviert</string>
<string name="texttospeech_initialization_failed">Die Initialisierung er Vorlesefunktion ist fehlgeschlagen. Bitte versuchen Sie es noch einmal</string>
<string name="texttospeech_initialization_failed">Die Initialisierung der Vorlesefunktion ist fehlgeschlagen. Bitte versuchen Sie es noch einmal</string>
<string name="texttospeech_error">Unerwarteter Fehler in der Vorlesefunktion. Bitte versuchen Sie es noch einmal</string>
<string name="next">Nächste</string>
<string name="previous">Vorherige</string>
Expand Down
23 changes: 23 additions & 0 deletions core/src/main/res/values-in/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<string name="hotspot_dialog_neutral_button">LANJUT</string>
<string name="start_server_label">Nyalakan server</string>
<string name="stop_server_label">Matikan server</string>
<string name="error_ip_address_not_found">Tak dapat menemukan alamat IP.</string>
<string name="server_started_message">Masukkan alamat IP ini ke browser Anda untuk mengakses server %s</string>
<string name="error_file_not_found">Galat: Berkas ZIM yang dipilih tidak ditemukan.</string>
<string name="zim_not_opened">Zim file tidak dapat dibuka</string>
Expand All @@ -70,7 +71,9 @@
<string name="delete_recent_search_item">Hapus item ini?</string>
<string name="pref_clear_all_history_title">Hapus riwayat</string>
<string name="pref_clear_all_history_summary">Hapus riwayat penelusuran dan tab terakhir</string>
<string name="pref_permission">Izin</string>
<string name="all_history_cleared">Semua Markah Telah Dibersihkan</string>
<string name="pref_clear_all_bookmarks_title">Hapus markah buku</string>
<string name="clear_all_history_dialog_title">Bersihkan Semua Riwayat?</string>
<string name="share">Bagikan</string>
<string name="selected_file_cab_app_chooser_title">Bagikan ZIM file dengan:</string>
Expand All @@ -82,6 +85,7 @@
<string name="did_you_know">Tahukah Anda?</string>
<string name="undo">Urungkan</string>
<string name="tab_closed">Tab ditutup</string>
<string name="tabs_closed">Tab ditutup</string>
<string name="bookmark_added">Markah ditambahkan</string>
<string name="rate_dialog_title">Silakan Nilai Kami</string>
<string name="rate_dialog_positive">Nilai!</string>
Expand Down Expand Up @@ -154,7 +158,11 @@
<string name="do_not_ask_anymore">Jangan tanya lagi</string>
<string name="your_languages">Bahasa terpilih:</string>
<string name="other_languages">Bahasa lain:</string>
<string name="crash_title">Yah… Ini memalukan</string>
<string name="crash_checkbox_zimfiles">Daftar file Zim Anda</string>
<string name="crash_checkbox_logs">Log Aplikasi</string>
<string name="crash_checkbox_device">Rincian Perangkat</string>
<string name="crash_button_confirm">KIRIM RINCIAN</string>
<string name="new_tab_shortcut_label">Tab baru</string>
<string name="get_content_shortcut_label">Ambil konten</string>
<string name="fav_icon">Favicon</string>
Expand All @@ -175,6 +183,7 @@
<string name="history_from_current_book">Lihat riwayat semua buku</string>
<string name="search_history" fuzzy="true">Riwayat pencarian</string>
<string name="selected_items">%1$d dipilih</string>
<string name="switch_tabs">Beralih tab</string>
<string name="close_all_tabs">Tutup semua tab</string>
<string name="running_state">Dalam proses</string>
<string name="complete">Selesai</string>
Expand All @@ -197,6 +206,8 @@
<string name="notes_deletion_unsuccessful">Beberapa file tidak terhapus</string>
<string name="books_count">%d buku</string>
<string name="connection_failed">Koneksi gagal</string>
<string name="your_device">Perangkat Anda:</string>
<string name="nearby_devices">PERANGKAT SEKITAR</string>
<string name="files_for_transfer">FILE UNTUK DIPINDAHKAN</string>
<string name="preparing_files" fuzzy="true">Mempersiapkan file untuk dipindahkan....</string>
<string name="performing_handshake" fuzzy="true">Melakukan jabat tangan....</string>
Expand All @@ -214,7 +225,19 @@
<string name="no_results">Tidak ada Hasil</string>
<string name="no_bookmarks">Tidak Ada Markah</string>
<string name="no_history">Tidak ada Riwayat</string>
<string name="delete_history">Hapus Semua Riwayat?</string>
<string name="delete_selected_history">Hapus Riwayat Terpilih?</string>
<string name="delete_bookmarks">Hapus Semua Markah Buku?</string>
<string name="delete_selected_bookmarks">Hapus Markah Buku Terpilih?</string>
<string name="on">Nyala</string>
<string name="off">Mati</string>
<string name="auto">Otomatis</string>
<string name="diagnostic_report_message">Kirimkan semua detil berikut agar kami dapat menelaah masalahnya</string>
<string name="percentage">%d%%</string>
<string name="search_open_in_new_tab">Buka di tab baru</string>
<string name="tab_restored">Tab dipulihkan</string>
<string name="tabs_restored">Tab-tab dipulihkan</string>
<string name="allowed">Izinkan</string>
<string name="not_allowed">Jangan izinkan</string>
<string name="go_to_settings_label">Pergi ke Pengaturan</string>
</resources>
8 changes: 7 additions & 1 deletion core/src/main/res/values-sc/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
<string name="hotspot_notification_content_title">Hotspot Kiwix</string>
<string name="start_server_label">Avia su servidore</string>
<string name="stop_server_label">Firma su servidore</string>
<string name="error_server_already_running">Custu serbidore est giai in esecutzione. Pro praghere istuda·lu e torra·lu a allùghere.</string>
<string name="error_ip_address_not_found">Non potzo agatare s\'indiritzu IP.</string>
<string name="server_started_message">Inserta custu indiritzu ip in su navigadore tuo pro intrare in su servidore %s</string>
<string name="share_host_address">Cumpartzi s\'URL cun àteras aplicatziones</string>
<string name="error_file_not_found">Errore: su documentu ZIM ischertadu no est istadu agatadu.</string>
Expand Down Expand Up @@ -206,7 +208,7 @@
<string name="complete">Acabadu</string>
<string name="paused_state">In pàusa</string>
<string name="failed_state">Fallidu: %s</string>
<string name="custom_download_error_message_for_authentication_failed" fuzzy="true">Su documentu zim non s\'est pòdidu iscarrigare, proa a torrare a installare s\'aplicatzione dae sa butega de aplicatziones</string>
<string name="custom_download_error_message_for_authentication_failed">Su documentu zim non s\'est pòdidu iscarrigare. Proa a torrare a installare s\'aplicatzione dae sa butega de aplicatziones</string>
<string name="save">Sarva</string>
<string name="note">Nota</string>
<string name="wiki_article_title">Tìtulu de s\'artìculu de sa Wiki</string>
Expand Down Expand Up @@ -319,4 +321,8 @@
<string name="navigation_history_cleared">Cronologia de navigatzione isboidada</string>
<string name="go_to_settings_label">Bae a sas impostatziones</string>
<string name="request_notification_permission_message">Pro fàghere custa atzione fruni s\'atzessu a sas notìficas</string>
<string name="click_nearby_devices_message">Incarca inoghe pro chircare dispositivos a curtzu.</string>
<string name="your_device_name_message">Su nùmene de su dispositivu tuo at a apàrrere inoghe.</string>
<string name="nearby_devices_list_message">Inoghe, as a atzapare una lista de dispositivos a curtzu. Toca subra de su nùmene de unu dispositivu pro incumintzare cun sa tràmuda de archìvios.</string>
<string name="transfer_zim_files_list_message">Inoghe as a atzapare sa lista de archìvios ZIM a disponimentu pro sa tràmuda.</string>
</resources>
4 changes: 2 additions & 2 deletions core/src/main/res/values-xal/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<string name="open_in_new_tab">Холвасыг оңгдан хавчурһд неетн</string>
<string name="hotspot_service_channel_name">Цацх цегин үүлчллһнә цувг</string>
<string name="hotspot_failed_title">Цацх цегиг асаҗ чадсн уга.</string>
<string name="hotspot_failed_message">Цацх цегтн асаһата кевтә. Үрглҗлүлхин төләд цацх цегән унтрахнтн.</string>
<string name="hotspot_failed_message">Цацх цегтн асалһата кевтә. Үрглҗлүлхин төләд цацх цегән унтрахнтн.</string>
<string name="server_failed_message">Сервериг аҗллулх болмҗ уга</string>
<string name="server_failed_toast_message">Сервериг аҗллулх болмҗ уга.</string>
<string name="server_started_successfully_toast_message">Сервериг амҗлтта аҗллулв.</string>
Expand Down Expand Up @@ -59,7 +59,7 @@
<string name="no_thanks">Уга, байрлҗанав.</string>
<string name="rate_dialog_neutral">Хөөннь</string>
<string name="open">Неех</string>
<string name="local_zims">Токармҗ</string>
<string name="local_zims">Төкәрмҗ</string>
<string name="library">Саң</string>
<string name="delete_zims_toast">Файлнь амҗлтта уга кегдв</string>
<string name="zim_simple">Эңгин</string>
Expand Down
Loading

0 comments on commit f6d86fb

Please sign in to comment.