Skip to content

Commit

Permalink
v.0.16.0
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
pablo03v authored Apr 4, 2024
1 parent e124442 commit ede97fd
Show file tree
Hide file tree
Showing 68 changed files with 1,045 additions and 518 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId = "cloud.pablos.overload"
minSdk = 26
targetSdk = 34
versionCode = 150
versionName = "0.15.0"
versionCode = 160
versionName = "0.16.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

Expand Down
23 changes: 20 additions & 3 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,27 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 150,
"versionName": "0.15.0",
"versionCode": 160,
"versionName": "0.16.0",
"outputFile": "app-release.apk"
}
],
"elementType": "File"
"elementType": "File",
"baselineProfiles": [
{
"minApi": 28,
"maxApi": 30,
"baselineProfiles": [
"baselineProfiles/1/app-release.dm"
]
},
{
"minApi": 31,
"maxApi": 2147483647,
"baselineProfiles": [
"baselineProfiles/0/app-release.dm"
]
}
],
"minSdkVersionForDexing": 26
}
Binary file modified app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 21 additions & 24 deletions app/src/main/java/cloud/pablos/overload/data/item/ItemDao.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Query
import androidx.room.Upsert
import cloud.pablos.overload.ui.tabs.home.getItemsOfDay
import cloud.pablos.overload.ui.views.extractDate
import cloud.pablos.overload.ui.views.parseToLocalDateTime
import kotlinx.coroutines.flow.Flow
Expand All @@ -16,9 +17,9 @@ interface ItemDao {
suspend fun upsertItem(item: Item)

/*@Upsert
suspend fun upsertItems(items: List<Item>)*/
suspend fun upsertItems(items: List<Item>)
/*@Delete
@Delete
suspend fun deleteItem(item: Item)*/

@Delete
Expand Down Expand Up @@ -55,11 +56,7 @@ fun startOrStopPause(
) {
val date = LocalDate.now()

val itemsForToday =
state.items.filter { item ->
val startTime = parseToLocalDateTime(item.startTime)
extractDate(startTime) == date
}
val itemsForToday = getItemsOfDay(date, state)
val isFirstToday = itemsForToday.isEmpty()
val isOngoingToday = itemsForToday.isNotEmpty() && itemsForToday.last().ongoing

Expand All @@ -73,32 +70,32 @@ fun startOrStopPause(
if (isOngoingNotToday) {
onEvent(ItemEvent.SetForgotToStopDialogShown(true))
} else if (isFirstToday) {
onEvent(ItemEvent.SetStart(start = LocalDateTime.now().toString()))
onEvent(ItemEvent.SetOngoing(ongoing = true))
onEvent(ItemEvent.SetPause(pause = false))
onEvent(ItemEvent.SetStart(LocalDateTime.now().toString()))
onEvent(ItemEvent.SetOngoing(true))
onEvent(ItemEvent.SetPause(false))
onEvent(ItemEvent.SaveItem)

onEvent(ItemEvent.SetIsOngoing(isOngoing = true))
onEvent(ItemEvent.SetIsOngoing(true))
} else if (isOngoingToday) {
onEvent(ItemEvent.SetId(id = itemsForToday.last().id))
onEvent(ItemEvent.SetStart(start = itemsForToday.last().startTime))
onEvent(ItemEvent.SetEnd(end = LocalDateTime.now().toString()))
onEvent(ItemEvent.SetOngoing(ongoing = false))
onEvent(ItemEvent.SetId(itemsForToday.last().id))
onEvent(ItemEvent.SetStart(itemsForToday.last().startTime))
onEvent(ItemEvent.SetEnd(LocalDateTime.now().toString()))
onEvent(ItemEvent.SetOngoing(false))
onEvent(ItemEvent.SaveItem)

onEvent(ItemEvent.SetIsOngoing(isOngoing = false))
onEvent(ItemEvent.SetIsOngoing(false))
} else {
onEvent(ItemEvent.SetStart(start = itemsForToday.last().endTime))
onEvent(ItemEvent.SetEnd(end = LocalDateTime.now().toString()))
onEvent(ItemEvent.SetOngoing(ongoing = false))
onEvent(ItemEvent.SetPause(pause = true))
onEvent(ItemEvent.SetStart(itemsForToday.last().endTime))
onEvent(ItemEvent.SetEnd(LocalDateTime.now().toString()))
onEvent(ItemEvent.SetOngoing(false))
onEvent(ItemEvent.SetPause(true))
onEvent(ItemEvent.SaveItem)

onEvent(ItemEvent.SetStart(start = LocalDateTime.now().toString()))
onEvent(ItemEvent.SetOngoing(ongoing = true))
onEvent(ItemEvent.SetPause(pause = false))
onEvent(ItemEvent.SetStart(LocalDateTime.now().toString()))
onEvent(ItemEvent.SetOngoing(true))
onEvent(ItemEvent.SetPause(false))
onEvent(ItemEvent.SaveItem)

onEvent(ItemEvent.SetIsOngoing(isOngoing = true))
onEvent(ItemEvent.SetIsOngoing(true))
}
}
2 changes: 2 additions & 0 deletions app/src/main/java/cloud/pablos/overload/ui/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import androidx.room.Room
import cloud.pablos.overload.R
import cloud.pablos.overload.data.item.ItemDatabase
import cloud.pablos.overload.data.item.ItemViewModel
import cloud.pablos.overload.ui.tabs.configurations.handleIntent
Expand Down Expand Up @@ -48,6 +49,7 @@ class MainActivity : ComponentActivity() {
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setTheme(R.style.Theme_Overload)

WindowCompat.setDecorFitsSystemWindows(window, false)

Expand Down
Loading

0 comments on commit ede97fd

Please sign in to comment.