Skip to content

Commit

Permalink
Merge branch 'release-1.8.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
nevenz committed Sep 23, 2022
2 parents f779088 + b3fa3f0 commit 6402c57
Show file tree
Hide file tree
Showing 25 changed files with 179 additions and 24 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
minSdkVersion 21 // Lollipop (5.0)
targetSdkVersion 32 // Android 12L
applicationId "com.orgzly"
versionCode 166
versionName "1.8.8"
versionCode 168
versionName "1.8.9"

testInstrumentationRunner "com.orgzly.android.OrgzlyTestRunner"
// testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import android.os.Handler
import android.util.Log
import android.view.*
import androidx.activity.OnBackPressedCallback
import androidx.core.view.WindowCompat
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.LinearLayoutManager
Expand Down Expand Up @@ -39,6 +38,7 @@ import com.orgzly.android.ui.notes.quickbar.QuickBars
import com.orgzly.android.ui.refile.RefileFragment
import com.orgzly.android.ui.settings.SettingsActivity
import com.orgzly.android.ui.util.ActivityUtils
import com.orgzly.android.ui.util.setDecorFitsSystemWindowsForBottomToolbar
import com.orgzly.android.ui.util.setup
import com.orgzly.android.ui.util.styledAttributes
import com.orgzly.android.util.LogUtils
Expand Down Expand Up @@ -537,6 +537,8 @@ class BookFragment :
if (BuildConfig.LOG_DEBUG) LogUtils.d(TAG)

binding.bottomToolbar.visibility = View.GONE

activity?.setDecorFitsSystemWindowsForBottomToolbar(binding.bottomToolbar.visibility)
}

private fun topToolbarToMainSelection() {
Expand Down Expand Up @@ -578,6 +580,8 @@ class BookFragment :
}

visibility = View.VISIBLE

activity?.setDecorFitsSystemWindowsForBottomToolbar(visibility)
}
}

Expand Down Expand Up @@ -624,6 +628,8 @@ class BookFragment :
}

visibility = View.VISIBLE

activity?.setDecorFitsSystemWindowsForBottomToolbar(visibility)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.activity.OnBackPressedCallback
import androidx.core.view.WindowCompat
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.DividerItemDecoration
Expand All @@ -30,10 +29,12 @@ import com.orgzly.android.ui.notes.quickbar.QuickBars
import com.orgzly.android.ui.settings.SettingsActivity
import com.orgzly.android.ui.stickyheaders.StickyHeadersLinearLayoutManager
import com.orgzly.android.ui.util.ActivityUtils
import com.orgzly.android.ui.util.setDecorFitsSystemWindowsForBottomToolbar
import com.orgzly.android.ui.util.setup
import com.orgzly.android.util.LogUtils
import com.orgzly.databinding.FragmentQueryAgendaBinding


/**
* Displays agenda results.
*/
Expand Down Expand Up @@ -160,6 +161,8 @@ class AgendaFragment :

private fun bottomToolbarToDefault() {
binding.bottomToolbar.visibility = View.GONE

activity?.setDecorFitsSystemWindowsForBottomToolbar(binding.bottomToolbar.visibility)
}

private fun topToolbarToMainSelection() {
Expand Down Expand Up @@ -191,6 +194,8 @@ class AgendaFragment :
}

visibility = View.VISIBLE

activity?.setDecorFitsSystemWindowsForBottomToolbar(visibility)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.activity.OnBackPressedCallback
import androidx.core.view.WindowCompat
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.DividerItemDecoration
Expand All @@ -30,6 +29,7 @@ import com.orgzly.android.ui.notes.quickbar.QuickBarListener
import com.orgzly.android.ui.notes.quickbar.QuickBars
import com.orgzly.android.ui.settings.SettingsActivity
import com.orgzly.android.ui.util.ActivityUtils
import com.orgzly.android.ui.util.setDecorFitsSystemWindowsForBottomToolbar
import com.orgzly.android.ui.util.setup
import com.orgzly.android.util.LogUtils
import com.orgzly.databinding.FragmentQuerySearchBinding
Expand Down Expand Up @@ -161,6 +161,8 @@ class SearchFragment :

private fun bottomToolbarToDefault() {
binding.bottomToolbar.visibility = View.GONE

activity?.setDecorFitsSystemWindowsForBottomToolbar(binding.bottomToolbar.visibility)
}

private fun topToolbarToMainSelection() {
Expand Down Expand Up @@ -192,6 +194,8 @@ class SearchFragment :
}

visibility = View.VISIBLE

activity?.setDecorFitsSystemWindowsForBottomToolbar(visibility)
}
}

Expand Down
12 changes: 12 additions & 0 deletions app/src/main/java/com/orgzly/android/ui/util/ActivityUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.app.PendingIntent
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.res.Configuration
import android.net.Uri
import android.os.Build
import android.os.Handler
Expand All @@ -16,6 +17,7 @@ import android.widget.ScrollView
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.view.menu.ActionMenuItemView
import androidx.appcompat.widget.Toolbar
import androidx.core.view.WindowCompat
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.orgzly.BuildConfig
import com.orgzly.R
Expand Down Expand Up @@ -259,3 +261,13 @@ object ActivityUtils {
}
}
}

/** Don't fit decor to system windows only in portrait mode when the bottom toolbar is visible. */
fun Activity.setDecorFitsSystemWindowsForBottomToolbar(visibility: Int) {
val orientation = resources.configuration.orientation
if (visibility == View.VISIBLE && orientation == Configuration.ORIENTATION_PORTRAIT) {
WindowCompat.setDecorFitsSystemWindows(window, false)
} else {
WindowCompat.setDecorFitsSystemWindows(window, true)
}
}
14 changes: 14 additions & 0 deletions app/src/main/res/layout/dialog_whats_new.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@
android:text="@string/whats_new_intro"/>


<TextView
style="@style/WhatsNewVersion"
android:text="v1.8.9"
tools:ignore="HardcodedText" />

<com.orgzly.android.ui.views.WhatsNewChange
style="@style/WhatsNewChange"
app:text="Dynamic color scheme" />

<com.orgzly.android.ui.views.WhatsNewChange
style="@style/WhatsNewChange"
app:text="Fix starting sync from the background (e.g. auto-sync or ActionReceiver)" />


<TextView
style="@style/WhatsNewVersion"
android:text="v1.8.8"
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/res/values-cs-rCZ/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@
<string name="searches">Vyhledávání</string>
<string name="search">Hledat</string>
<string name="new_search">Nové hledání</string>
<string name="no_repos">Nebyly konfigurovány žádné repozitáře</string>
<string name="multiple_repos">Existuje více úložišť</string>
<string name="no_repos">Nebyly konfigurovány žádné repozitáře</string>
<string name="no_books">Nebyly nalezeny žádné sešity</string>
<string name="book_encoding">Znaková sada sešitu</string>
<string name="collecting_notebooks_in_progress">Shromažďuji sešity…</string>
<string name="syncing_in_progress">Synchronizuji…</string>
Expand Down Expand Up @@ -287,6 +288,10 @@
<string name="notebooks_sort_order">Pořadí sešitů</string>
<string name="font_size">Velikost písma</string>
<string name="color_scheme">Barevné téma</string>
<string name="other">Ostatní</string>
<string name="theme">Vzhled</string>
<string name="light_scheme">Světlý vzhled</string>
<string name="dark_scheme">Tmavý vzhled</string>
<string name="monospaced_font">Neproporcionální písmo</string>
<string name="monospaced_font_summary">Použít neproporcionální písmo pro obsah poznámky a úvod sešitu</string>
<string name="reversed_note_click_action">Zaměnit akci kliknutí a přidržení poznámky</string>
Expand Down Expand Up @@ -354,6 +359,7 @@
<string name="displayed_book_details_last_action">Poslední akce</string>
<string name="displayed_book_details_notes_count">Počet poznámek</string>
<string name="color_scheme_system">Systém</string>
<string name="color_scheme_dynamic">Dynamický vzhled</string>
<string name="color_scheme_light">Světlé</string>
<string name="color_scheme_dark">Tmavé</string>
<string name="color_scheme_black">Černé</string>
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@
<string name="searches">Suchen</string>
<string name="search">Suche</string>
<string name="new_search">Neue Suche</string>
<string name="no_repos">Keine Ablageorte eingerichtet</string>
<string name="multiple_repos">Es existieren mehrere Ablageorte</string>
<string name="no_repos">Keine Ablageorte eingerichtet</string>
<string name="no_books">No notebooks found</string>
<string name="book_encoding">Zeichensatz für das Notizbuch</string>
<string name="collecting_notebooks_in_progress">Notizbücher werden gesammelt …</string>
<string name="syncing_in_progress">Synchronisation läuft …</string>
Expand Down Expand Up @@ -281,6 +282,10 @@
<string name="notebooks_sort_order">Sortierreihenfolge für Notizbücher</string>
<string name="font_size">Schriftgröße</string>
<string name="color_scheme">Farbschema</string>
<string name="other">Other</string>
<string name="theme">Theme</string>
<string name="light_scheme">Light scheme</string>
<string name="dark_scheme">Dark scheme</string>
<string name="monospaced_font">Nichtproportionale Schriftart</string>
<string name="monospaced_font_summary">Für Notizinhalt und Notizbucheinleitung nichtproportionale Schriftart verwenden</string>
<string name="reversed_note_click_action">Notizklick- und Langklick-Aktionen tauschen</string>
Expand Down Expand Up @@ -348,6 +353,7 @@
<string name="displayed_book_details_last_action">Letzte Aktion</string>
<string name="displayed_book_details_notes_count">Notizenanzahl</string>
<string name="color_scheme_system">System</string>
<string name="color_scheme_dynamic">Dynamic color</string>
<string name="color_scheme_light">Hell</string>
<string name="color_scheme_dark">Dunkel</string>
<string name="color_scheme_black">Schwarz</string>
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/res/values-es-rES/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@
<string name="searches">Búsquedas</string>
<string name="search">Búsqueda</string>
<string name="new_search">Nueva búsqueda</string>
<string name="no_repos">No hay repositorios configurados</string>
<string name="multiple_repos">Existen múltiples repositorios</string>
<string name="no_repos">No hay repositorios configurados</string>
<string name="no_books">Ningún cuaderno encontrado</string>
<string name="book_encoding">Codificación del cuaderno</string>
<string name="collecting_notebooks_in_progress">Recogiendo cuadernos…</string>
<string name="syncing_in_progress">Sincronizando…</string>
Expand Down Expand Up @@ -281,6 +282,10 @@
<string name="notebooks_sort_order">Orden de clasificación de las notas</string>
<string name="font_size">Tamaño de letra</string>
<string name="color_scheme">Combinación de colores</string>
<string name="other">Otro</string>
<string name="theme">Tema</string>
<string name="light_scheme">Tema claro</string>
<string name="dark_scheme">Tema oscuro</string>
<string name="monospaced_font">Fuente monoespaciada</string>
<string name="monospaced_font_summary">Usar fuente monoespaciada para el contenido de las notas y las portada de los libros</string>
<string name="reversed_note_click_action">Acción de click de nota invertida</string>
Expand Down Expand Up @@ -348,6 +353,7 @@
<string name="displayed_book_details_last_action">Ultima acción</string>
<string name="displayed_book_details_notes_count">Contador de notas</string>
<string name="color_scheme_system">Sistema</string>
<string name="color_scheme_dynamic">Color dinámico</string>
<string name="color_scheme_light">Claro</string>
<string name="color_scheme_dark">Oscuro</string>
<string name="color_scheme_black">Negro</string>
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/res/values-fr-rFR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@
<string name="searches">Recherches</string>
<string name="search">Chercher</string>
<string name="new_search">Nouvelle recherche</string>
<string name="no_repos">Aucun dépôt configuré</string>
<string name="multiple_repos">Il existe plusieurs dépôts</string>
<string name="no_repos">Aucun dépôt configuré</string>
<string name="no_books">Aucun bloc-notes trouvé</string>
<string name="book_encoding">Encodage du bloc-notes</string>
<string name="collecting_notebooks_in_progress">Récupération des blocs-notes…</string>
<string name="syncing_in_progress">Synchronisation en cours…</string>
Expand Down Expand Up @@ -281,6 +282,10 @@
<string name="notebooks_sort_order">Ordre de tri des bloc-notes</string>
<string name="font_size">Taille de police</string>
<string name="color_scheme">Jeu de couleurs</string>
<string name="other">Autre</string>
<string name="theme">Thème</string>
<string name="light_scheme">Schém clair</string>
<string name="dark_scheme">Schéma sombre</string>
<string name="monospaced_font">Police à chasse fixe</string>
<string name="monospaced_font_summary">Utiliser une police à chasse fixe pour le contenu des notes et la préface du bloc-notes</string>
<string name="reversed_note_click_action">Échanger les actions des clics court et long sur les notes</string>
Expand Down Expand Up @@ -348,6 +353,7 @@
<string name="displayed_book_details_last_action">Dernière action</string>
<string name="displayed_book_details_notes_count">Nombre de notes</string>
<string name="color_scheme_system">Système</string>
<string name="color_scheme_dynamic">Couleur dynamique</string>
<string name="color_scheme_light">Clair</string>
<string name="color_scheme_dark">Sombre</string>
<string name="color_scheme_black">Noir</string>
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/res/values-hu-rHU/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@
<string name="searches">Keresések</string>
<string name="search">Keresés</string>
<string name="new_search">Új keresés</string>
<string name="no_repos">Nincs beállítva tárolóhely</string>
<string name="multiple_repos">Több tárolóhely is létezik</string>
<string name="no_repos">Nincs beállítva tárolóhely</string>
<string name="no_books">Nem található jegyzetfüzet</string>
<string name="book_encoding">Jegyzetfüzet kódolása</string>
<string name="collecting_notebooks_in_progress">Jegyzetfüzetek összegyűjtése…</string>
<string name="syncing_in_progress">Szinkronizálás…</string>
Expand Down Expand Up @@ -281,6 +282,10 @@
<string name="notebooks_sort_order">Jegyzetfüzetek rendezési sorrendje</string>
<string name="font_size">Betűméret</string>
<string name="color_scheme">Színséma</string>
<string name="other">Egyéb</string>
<string name="theme">Színtéma</string>
<string name="light_scheme">Világos színtéma</string>
<string name="dark_scheme">Sötét színtéma</string>
<string name="monospaced_font">Rögzített szélességű betűtípus</string>
<string name="monospaced_font_summary">Rögzített szélességű betűtípussal mutassa a bejegyzések tartalmát és a könyv előszavát</string>
<string name="reversed_note_click_action">Bejegyzésre koppintás eredményének megfordítása</string>
Expand Down Expand Up @@ -348,6 +353,7 @@
<string name="displayed_book_details_last_action">Utolsó művelet</string>
<string name="displayed_book_details_notes_count">Bejegyzések száma</string>
<string name="color_scheme_system">Rendszer</string>
<string name="color_scheme_dynamic">A rendszer szerinti színtéma</string>
<string name="color_scheme_light">Világos</string>
<string name="color_scheme_dark">Sötét</string>
<string name="color_scheme_black">Fekete</string>
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/res/values-in-rID/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@
<string name="searches">Pencarian</string>
<string name="search">Cari</string>
<string name="new_search">Cari lagi</string>
<string name="no_repos">Tidak ada repositori yang dikonfigurasi</string>
<string name="multiple_repos">Beberapa repositori ada</string>
<string name="no_repos">Tidak ada repositori yang dikonfigurasi</string>
<string name="no_books">No notebooks found</string>
<string name="book_encoding">Pengkodean notebook</string>
<string name="collecting_notebooks_in_progress">Collecting notebooks…</string>
<string name="syncing_in_progress">Sinkronisasi…</string>
Expand Down Expand Up @@ -278,6 +279,10 @@
<string name="notebooks_sort_order">Urut berdasarkan notebook</string>
<string name="font_size">Ukuran huruf</string>
<string name="color_scheme">Skema warna</string>
<string name="other">Other</string>
<string name="theme">Theme</string>
<string name="light_scheme">Light scheme</string>
<string name="dark_scheme">Dark scheme</string>
<string name="monospaced_font">Huruf monospace</string>
<string name="monospaced_font_summary">Gunakan huruf monospace untuk konten catatan dan kata pengantar buku</string>
<string name="reversed_note_click_action">Swap note click and long-click actions</string>
Expand Down Expand Up @@ -345,6 +350,7 @@
<string name="displayed_book_details_last_action">Tindakan terakhir</string>
<string name="displayed_book_details_notes_count">Hitungan catatan</string>
<string name="color_scheme_system">System</string>
<string name="color_scheme_dynamic">Dynamic color</string>
<string name="color_scheme_light">Terang</string>
<string name="color_scheme_dark">Gelap</string>
<string name="color_scheme_black">Hitam</string>
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/res/values-it-rIT/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@
<string name="searches">Ricerche</string>
<string name="search">Cerca</string>
<string name="new_search">Nuova ricerca</string>
<string name="no_repos">Nessun deposito è configurato</string>
<string name="multiple_repos">Esistono depositi multipli</string>
<string name="no_repos">Nessun deposito è configurato</string>
<string name="no_books">No notebooks found</string>
<string name="book_encoding">Codifica del taccuino</string>
<string name="collecting_notebooks_in_progress">Sincronizzando i taccuini…</string>
<string name="syncing_in_progress">Sincronizzazione…</string>
Expand Down Expand Up @@ -281,6 +282,10 @@
<string name="notebooks_sort_order">Assortisci l\'ordine dei taccuini</string>
<string name="font_size">Dimensione del carattere</string>
<string name="color_scheme">Combinazioni di colori</string>
<string name="other">Other</string>
<string name="theme">Theme</string>
<string name="light_scheme">Light scheme</string>
<string name="dark_scheme">Dark scheme</string>
<string name="monospaced_font">Carattere a spaziatura fissa</string>
<string name="monospaced_font_summary">Utilizza un carattere a spaziatura fissa per il contenuto della nota e la prefazione del libro</string>
<string name="reversed_note_click_action">Scambia il click della nota con azioni a lungo click</string>
Expand Down Expand Up @@ -348,6 +353,7 @@
<string name="displayed_book_details_last_action">Ultima azione</string>
<string name="displayed_book_details_notes_count">Conteggio note</string>
<string name="color_scheme_system">System</string>
<string name="color_scheme_dynamic">Dynamic color</string>
<string name="color_scheme_light">Illuminazione</string>
<string name="color_scheme_dark">Scuro</string>
<string name="color_scheme_black">Nero</string>
Expand Down
Loading

0 comments on commit 6402c57

Please sign in to comment.