Skip to content

Commit ede97fd

Browse files
authored
v.0.16.0
- you can now swipe between days in the calendar tab on phones - updates app icon - updates splash screen theme - fixes multiple swiping issues on tablets - adds delete forever button on tablets - updates translations #39
1 parent e124442 commit ede97fd

File tree

68 files changed

+1045
-518
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1045
-518
lines changed

app/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ android {
1212
applicationId = "cloud.pablos.overload"
1313
minSdk = 26
1414
targetSdk = 34
15-
versionCode = 150
16-
versionName = "0.15.0"
15+
versionCode = 160
16+
versionName = "0.16.0"
1717
vectorDrawables.useSupportLibrary = true
1818
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
1919

app/release/output-metadata.json

+20-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,27 @@
1111
"type": "SINGLE",
1212
"filters": [],
1313
"attributes": [],
14-
"versionCode": 150,
15-
"versionName": "0.15.0",
14+
"versionCode": 160,
15+
"versionName": "0.16.0",
1616
"outputFile": "app-release.apk"
1717
}
1818
],
19-
"elementType": "File"
19+
"elementType": "File",
20+
"baselineProfiles": [
21+
{
22+
"minApi": 28,
23+
"maxApi": 30,
24+
"baselineProfiles": [
25+
"baselineProfiles/1/app-release.dm"
26+
]
27+
},
28+
{
29+
"minApi": 31,
30+
"maxApi": 2147483647,
31+
"baselineProfiles": [
32+
"baselineProfiles/0/app-release.dm"
33+
]
34+
}
35+
],
36+
"minSdkVersionForDexing": 26
2037
}
17.1 KB
Loading

app/src/main/java/cloud/pablos/overload/data/item/ItemDao.kt

+21-24
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import androidx.room.Dao
44
import androidx.room.Delete
55
import androidx.room.Query
66
import androidx.room.Upsert
7+
import cloud.pablos.overload.ui.tabs.home.getItemsOfDay
78
import cloud.pablos.overload.ui.views.extractDate
89
import cloud.pablos.overload.ui.views.parseToLocalDateTime
910
import kotlinx.coroutines.flow.Flow
@@ -16,9 +17,9 @@ interface ItemDao {
1617
suspend fun upsertItem(item: Item)
1718

1819
/*@Upsert
19-
suspend fun upsertItems(items: List<Item>)*/
20+
suspend fun upsertItems(items: List<Item>)
2021
21-
/*@Delete
22+
@Delete
2223
suspend fun deleteItem(item: Item)*/
2324

2425
@Delete
@@ -55,11 +56,7 @@ fun startOrStopPause(
5556
) {
5657
val date = LocalDate.now()
5758

58-
val itemsForToday =
59-
state.items.filter { item ->
60-
val startTime = parseToLocalDateTime(item.startTime)
61-
extractDate(startTime) == date
62-
}
59+
val itemsForToday = getItemsOfDay(date, state)
6360
val isFirstToday = itemsForToday.isEmpty()
6461
val isOngoingToday = itemsForToday.isNotEmpty() && itemsForToday.last().ongoing
6562

@@ -73,32 +70,32 @@ fun startOrStopPause(
7370
if (isOngoingNotToday) {
7471
onEvent(ItemEvent.SetForgotToStopDialogShown(true))
7572
} else if (isFirstToday) {
76-
onEvent(ItemEvent.SetStart(start = LocalDateTime.now().toString()))
77-
onEvent(ItemEvent.SetOngoing(ongoing = true))
78-
onEvent(ItemEvent.SetPause(pause = false))
73+
onEvent(ItemEvent.SetStart(LocalDateTime.now().toString()))
74+
onEvent(ItemEvent.SetOngoing(true))
75+
onEvent(ItemEvent.SetPause(false))
7976
onEvent(ItemEvent.SaveItem)
8077

81-
onEvent(ItemEvent.SetIsOngoing(isOngoing = true))
78+
onEvent(ItemEvent.SetIsOngoing(true))
8279
} else if (isOngoingToday) {
83-
onEvent(ItemEvent.SetId(id = itemsForToday.last().id))
84-
onEvent(ItemEvent.SetStart(start = itemsForToday.last().startTime))
85-
onEvent(ItemEvent.SetEnd(end = LocalDateTime.now().toString()))
86-
onEvent(ItemEvent.SetOngoing(ongoing = false))
80+
onEvent(ItemEvent.SetId(itemsForToday.last().id))
81+
onEvent(ItemEvent.SetStart(itemsForToday.last().startTime))
82+
onEvent(ItemEvent.SetEnd(LocalDateTime.now().toString()))
83+
onEvent(ItemEvent.SetOngoing(false))
8784
onEvent(ItemEvent.SaveItem)
8885

89-
onEvent(ItemEvent.SetIsOngoing(isOngoing = false))
86+
onEvent(ItemEvent.SetIsOngoing(false))
9087
} else {
91-
onEvent(ItemEvent.SetStart(start = itemsForToday.last().endTime))
92-
onEvent(ItemEvent.SetEnd(end = LocalDateTime.now().toString()))
93-
onEvent(ItemEvent.SetOngoing(ongoing = false))
94-
onEvent(ItemEvent.SetPause(pause = true))
88+
onEvent(ItemEvent.SetStart(itemsForToday.last().endTime))
89+
onEvent(ItemEvent.SetEnd(LocalDateTime.now().toString()))
90+
onEvent(ItemEvent.SetOngoing(false))
91+
onEvent(ItemEvent.SetPause(true))
9592
onEvent(ItemEvent.SaveItem)
9693

97-
onEvent(ItemEvent.SetStart(start = LocalDateTime.now().toString()))
98-
onEvent(ItemEvent.SetOngoing(ongoing = true))
99-
onEvent(ItemEvent.SetPause(pause = false))
94+
onEvent(ItemEvent.SetStart(LocalDateTime.now().toString()))
95+
onEvent(ItemEvent.SetOngoing(true))
96+
onEvent(ItemEvent.SetPause(false))
10097
onEvent(ItemEvent.SaveItem)
10198

102-
onEvent(ItemEvent.SetIsOngoing(isOngoing = true))
99+
onEvent(ItemEvent.SetIsOngoing(true))
103100
}
104101
}

app/src/main/java/cloud/pablos/overload/ui/MainActivity.kt

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import androidx.lifecycle.ViewModel
1818
import androidx.lifecycle.ViewModelProvider
1919
import androidx.lifecycle.lifecycleScope
2020
import androidx.room.Room
21+
import cloud.pablos.overload.R
2122
import cloud.pablos.overload.data.item.ItemDatabase
2223
import cloud.pablos.overload.data.item.ItemViewModel
2324
import cloud.pablos.overload.ui.tabs.configurations.handleIntent
@@ -48,6 +49,7 @@ class MainActivity : ComponentActivity() {
4849
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
4950
override fun onCreate(savedInstanceState: Bundle?) {
5051
super.onCreate(savedInstanceState)
52+
setTheme(R.style.Theme_Overload)
5153

5254
WindowCompat.setDecorFitsSystemWindows(window, false)
5355

0 commit comments

Comments
 (0)