Fix names and strings. Fix not all games shown in history.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-01-06 22:01:00 +01:00
parent 74be455d48
commit 2bf0666946
8 changed files with 13 additions and 31 deletions

View File

@@ -12,24 +12,6 @@
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:dataExtractionRules="@xml/data_extraction_rules"> android:dataExtractionRules="@xml/data_extraction_rules">
<activity
android:name=".DrawerActivity"
android:exported="false"
android:label="@string/title_activity_drawer"
android:theme="@style/AppTheme.NoActionBar">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".SettingsActivity"
android:exported="false"
android:label="@string/title_activity_settings">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"

View File

@@ -12,7 +12,7 @@ interface GameDao : DaoBase<Game> {
@Query("SELECT *, SUM(round.scoreA) as scoreA, SUM(round.scoreB) as scoreB, SUM(round.scoreB) as scoreB " + @Query("SELECT *, SUM(round.scoreA) as scoreA, SUM(round.scoreB) as scoreB, SUM(round.scoreB) as scoreB " +
"FROM game " + "FROM game " +
"LEFT JOIN round ON round.gameId = game.uid GROUP BY gameId ORDER BY modified DESC") "LEFT JOIN round ON round.gameId = game.uid GROUP BY game.uid ORDER BY modified DESC")
fun getAllWithPoints(): Flow<List<GameAndScore>> fun getAllWithPoints(): Flow<List<GameAndScore>>
@Query("SELECT * FROM game WHERE uid is :gameId") @Query("SELECT * FROM game WHERE uid is :gameId")

View File

@@ -87,10 +87,10 @@ class CounterFragment : FragmentBase<FragmentCounterBinding>(), MenuProvider {
override fun onMenuItemSelected(menuItem: MenuItem): Boolean { override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
return when (menuItem.itemId) { return when (menuItem.itemId) {
R.id.action_clear -> { R.id.action_new -> {
val builder = context?.let { AlertDialog.Builder(it) } val builder = context?.let { AlertDialog.Builder(it) }
if (builder != null) { if (builder != null) {
builder.setMessage(getString(R.string.confirmClear)).setTitle(R.string.clear) builder.setMessage(getString(R.string.confirmNew)).setTitle(R.string.clear)
.setCancelable(false) .setCancelable(false)
.setPositiveButton(getString(R.string.yes)) { dialog, _ -> .setPositiveButton(getString(R.string.yes)) { dialog, _ ->
dialog.dismiss() dialog.dismiss()

View File

@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".DrawerActivity"> tools:context=".MainActivity">
<com.google.android.material.appbar.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@@ -24,7 +24,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing" android:paddingTop="@dimen/nav_header_vertical_spacing"
android:text="@string/nav_header_title" android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<TextView <TextView

View File

@@ -9,7 +9,7 @@
android:title="@string/undo" android:title="@string/undo"
app:showAsAction="ifRoom" /> app:showAsAction="ifRoom" />
<item <item
android:id="@+id/action_clear" android:id="@+id/action_new"
android:checkable="false" android:checkable="false"
android:icon="@drawable/ic_baseline_add_24" android:icon="@drawable/ic_baseline_add_24"
android:orderInCategory="10" android:orderInCategory="10"

View File

@@ -4,7 +4,7 @@
<string name="undo">Letzte Runde löschen</string> <string name="undo">Letzte Runde löschen</string>
<string name="choose_theme_text">Theme auswählen</string> <string name="choose_theme_text">Theme auswählen</string>
<string name="keep_screen_on">Bildschirm eingeschaltet lassen</string> <string name="keep_screen_on">Bildschirm eingeschaltet lassen</string>
<string name="confirmClear">Möchten Sie das laufende Spiel wirklich löschen?</string> <string name="confirmNew">Möchten Sie wirklich ein neues Spiel starten?</string>
<string name="yes">Ja</string> <string name="yes">Ja</string>
<string name="no">Nein</string> <string name="no">Nein</string>
<string name="back">Zurück</string> <string name="back">Zurück</string>
@@ -18,4 +18,9 @@
<string name="display">Anzeige</string> <string name="display">Anzeige</string>
<string name="activate">Aktivieren</string> <string name="activate">Aktivieren</string>
<string name="delete">Löschen</string> <string name="delete">Löschen</string>
<string name="menu_history">Verlauf</string>
<string name="menu_settings">Einstellungen</string>
<string name="menu_counter">Counter</string>
<string name="submit">Übermitteln</string>
</resources> </resources>

View File

@@ -9,7 +9,7 @@
<string name="undo">Undo last round</string> <string name="undo">Undo last round</string>
<string name="choose_theme_text">Choose theme</string> <string name="choose_theme_text">Choose theme</string>
<string name="keep_screen_on">Keep screen on</string> <string name="keep_screen_on">Keep screen on</string>
<string name="confirmClear">Do you really want to delete the current game?</string> <string name="confirmNew">Do you really want to start a new Game?</string>
<string name="yes">Yes</string> <string name="yes">Yes</string>
<string name="no">No</string> <string name="no">No</string>
<string name="back">Back</string> <string name="back">Back</string>
@@ -21,13 +21,8 @@
<string name="dark">Dark</string> <string name="dark">Dark</string>
<string name="display">Display</string> <string name="display">Display</string>
<string name="settings">Settings</string> <string name="settings">Settings</string>
<string name="title_activity_drawer">DrawerActivity</string>
<string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string>
<string name="nav_header_title">Tichu Counter</string>
<string name="nav_header_subtitle">app@zobrist.me</string> <string name="nav_header_subtitle">app@zobrist.me</string>
<string name="nav_header_desc">Navigation header</string> <string name="nav_header_desc">Navigation header</string>
<string name="action_settings">Settings</string>
<string name="menu_counter">Counter</string> <string name="menu_counter">Counter</string>
<string name="menu_history">History</string> <string name="menu_history">History</string>