mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 01:39:22 +02:00
Compare commits
3 commits
73a82f3cf8
...
a36ffa861a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a36ffa861a | ||
![]() |
de0b6d1c8f | ||
![]() |
2e68798e2c |
10 changed files with 38 additions and 61 deletions
|
@ -167,24 +167,24 @@ wire {
|
|||
|
||||
dependencies {
|
||||
def nav_version = "2.5.3"
|
||||
def room_version = "2.6.1"
|
||||
def work_version = '2.10.0'
|
||||
def paging_version = "3.3.2"
|
||||
def room_version = "2.7.1"
|
||||
def work_version = '2.10.1'
|
||||
def paging_version = "3.3.6"
|
||||
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21"
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation 'androidx.core:core:1.15.0'
|
||||
implementation 'androidx.core:core:1.16.0'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.gridlayout:gridlayout:1.0.0'
|
||||
implementation 'androidx.gridlayout:gridlayout:1.1.0'
|
||||
implementation "com.google.android.material:material:1.12.0"
|
||||
implementation 'androidx.compose.material:material:1.7.5'
|
||||
implementation 'androidx.activity:activity-compose:1.9.3'
|
||||
implementation 'androidx.compose.material:material:1.8.0'
|
||||
implementation 'androidx.activity:activity-compose:1.10.1'
|
||||
implementation "com.google.accompanist:accompanist-flowlayout:0.30.0"
|
||||
implementation 'androidx.compose.material:material-icons-extended:1.7.6'
|
||||
debugImplementation "androidx.compose.ui:ui-tooling:1.7.6"
|
||||
implementation 'androidx.fragment:fragment-ktx:1.8.5'
|
||||
implementation 'androidx.fragment:fragment-compose:1.8.5'
|
||||
implementation 'androidx.compose.material:material-icons-extended:1.7.8'
|
||||
debugImplementation "androidx.compose.ui:ui-tooling:1.8.0"
|
||||
implementation 'androidx.fragment:fragment-ktx:1.8.6'
|
||||
implementation 'androidx.fragment:fragment-compose:1.8.6'
|
||||
|
||||
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
|
||||
implementation "androidx.navigation:navigation-ui:$nav_version"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* TimeLimit Copyright <C> 2019 - 2022 Jonas Lochmann
|
||||
* TimeLimit Copyright <C> 2019 - 2025 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -64,10 +64,10 @@ object U2FResponse {
|
|||
|
||||
val flags = rawResponse.payload[0]
|
||||
|
||||
val counter = rawResponse.payload[4].toUInt() or
|
||||
rawResponse.payload[3].toUInt().shl(8) or
|
||||
rawResponse.payload[2].toUInt().shl(16) or
|
||||
rawResponse.payload[1].toUInt().shl(24)
|
||||
val counter = rawResponse.payload[4].toUByte().toUInt() or
|
||||
rawResponse.payload[3].toUByte().toUInt().shl(8) or
|
||||
rawResponse.payload[2].toUByte().toUInt().shl(16) or
|
||||
rawResponse.payload[1].toUByte().toUInt().shl(24)
|
||||
|
||||
val signature = rawResponse.payload.sliceArray(5 until rawResponse.payload.size)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* TimeLimit Copyright <C> 2019 - 2023 Jonas Lochmann
|
||||
* TimeLimit Copyright <C> 2019 - 2025 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -49,7 +49,7 @@ fun ManageDeviceUserScreen(
|
|||
Card(
|
||||
onClick = { actions.select(item) },
|
||||
modifier = Modifier
|
||||
.animateItemPlacement()
|
||||
.animateItem()
|
||||
.fillMaxWidth(),
|
||||
backgroundColor = when (item.selected) {
|
||||
true -> MaterialTheme.colors.secondary
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* TimeLimit Copyright <C> 2019 - 2023 Jonas Lochmann
|
||||
* TimeLimit Copyright <C> 2019 - 2025 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -35,7 +35,7 @@ import io.timelimit.android.ui.model.main.OverviewHandling
|
|||
@OptIn(ExperimentalFoundationApi::class)
|
||||
fun LazyListScope.deviceItems(screen: OverviewHandling.OverviewScreen) {
|
||||
item (key = Pair("devices", "header")) {
|
||||
ListCommon.SectionHeader(stringResource(R.string.overview_header_devices), Modifier.animateItemPlacement())
|
||||
ListCommon.SectionHeader(stringResource(R.string.overview_header_devices), Modifier.animateItem())
|
||||
}
|
||||
|
||||
items(screen.devices.list, key = { Pair("device", it.device.id) }) {
|
||||
|
@ -48,7 +48,7 @@ fun LazyListScope.deviceItems(screen: OverviewHandling.OverviewScreen) {
|
|||
icon = Icons.Default.Add,
|
||||
label = stringResource(R.string.add_device),
|
||||
action = screen.actions.addDevice,
|
||||
modifier = Modifier.animateItemPlacement()
|
||||
modifier = Modifier.animateItem()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ fun LazyListScope.deviceItems(screen: OverviewHandling.OverviewScreen) {
|
|||
if (screen.devices.canShowMore != null) {
|
||||
item (key = Pair("devices", "more")) {
|
||||
ListCommon.ShowMoreItem(
|
||||
modifier = Modifier.animateItemPlacement(),
|
||||
modifier = Modifier.animateItem(),
|
||||
action = { screen.actions.showMoreDevices(screen.devices.canShowMore) }
|
||||
)
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ fun LazyItemScope.DeviceItem(
|
|||
) {
|
||||
ListCardCommon.Card(
|
||||
Modifier
|
||||
.animateItemPlacement()
|
||||
.animateItem()
|
||||
.padding(horizontal = 8.dp)
|
||||
.clickable(onClick = { openAction(item) })
|
||||
) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* TimeLimit Copyright <C> 2019 - 2023 Jonas Lochmann
|
||||
* TimeLimit Copyright <C> 2019 - 2025 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -40,7 +40,7 @@ fun LazyListScope.introItems(
|
|||
item (key = Pair("intro", "finish setup")) {
|
||||
ListCardCommon.Card(
|
||||
modifier = Modifier
|
||||
.animateItemPlacement()
|
||||
.animateItem()
|
||||
.padding(horizontal = 8.dp)
|
||||
) {
|
||||
Text(
|
||||
|
@ -62,7 +62,7 @@ fun LazyListScope.introItems(
|
|||
item (key = Pair("intro", "outdated server")) {
|
||||
ListCardCommon.Card(
|
||||
modifier = Modifier
|
||||
.animateItemPlacement()
|
||||
.animateItem()
|
||||
.padding(horizontal = 8.dp)
|
||||
) {
|
||||
Text(
|
||||
|
@ -79,7 +79,7 @@ fun LazyListScope.introItems(
|
|||
item (key = Pair("intro", "server message")) {
|
||||
ListCardCommon.Card(
|
||||
modifier = Modifier
|
||||
.animateItemPlacement()
|
||||
.animateItem()
|
||||
.padding(horizontal = 8.dp)
|
||||
) {
|
||||
Text(
|
||||
|
@ -108,7 +108,7 @@ fun LazyListScope.introItems(
|
|||
SwipeToDismiss(
|
||||
state = state,
|
||||
background = {},
|
||||
modifier = Modifier.animateItemPlacement()
|
||||
modifier = Modifier.animateItem()
|
||||
) {
|
||||
ListCardCommon.Card(
|
||||
modifier = Modifier.padding(horizontal = 8.dp)
|
||||
|
@ -133,7 +133,7 @@ fun LazyListScope.introItems(
|
|||
item (key = Pair("intro", "task review")) {
|
||||
ListCardCommon.Card(
|
||||
modifier = Modifier
|
||||
.animateItemPlacement()
|
||||
.animateItem()
|
||||
.padding(horizontal = 8.dp)
|
||||
) {
|
||||
Text(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* TimeLimit Copyright <C> 2019 - 2023 Jonas Lochmann
|
||||
* TimeLimit Copyright <C> 2019 - 2025 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -35,7 +35,7 @@ import io.timelimit.android.ui.model.main.OverviewHandling
|
|||
@OptIn(ExperimentalFoundationApi::class)
|
||||
fun LazyListScope.userItems(screen: OverviewHandling.OverviewScreen) {
|
||||
item (key = Pair("users", "header")) {
|
||||
ListCommon.SectionHeader(stringResource(R.string.overview_header_users), Modifier.animateItemPlacement())
|
||||
ListCommon.SectionHeader(stringResource(R.string.overview_header_users), Modifier.animateItem())
|
||||
}
|
||||
|
||||
items(screen.users.list, key = { Pair("user", it.id) }) { UserItem(it, screen.actions) }
|
||||
|
@ -45,13 +45,13 @@ fun LazyListScope.userItems(screen: OverviewHandling.OverviewScreen) {
|
|||
icon = Icons.Default.Add,
|
||||
label = stringResource(R.string.add_user_title),
|
||||
action = screen.actions.addUser,
|
||||
modifier = Modifier.animateItemPlacement()
|
||||
modifier = Modifier.animateItem()
|
||||
)
|
||||
}
|
||||
|
||||
if (screen.users.canShowMore) item (key = Pair("users", "more")) {
|
||||
ListCommon.ShowMoreItem (
|
||||
modifier = Modifier.animateItemPlacement(),
|
||||
modifier = Modifier.animateItem(),
|
||||
action = screen.actions.showMoreUsers
|
||||
)
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ fun LazyItemScope.UserItem(
|
|||
) {
|
||||
ListCardCommon.Card(
|
||||
Modifier
|
||||
.animateItemPlacement()
|
||||
.animateItem()
|
||||
.padding(horizontal = 8.dp)
|
||||
.clickable(onClick = { actions.openUser(user) })
|
||||
) {
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
package io.timelimit.android.ui.manage.category.blocked_times
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
class MinutesOfWeekItemsTest {
|
||||
@Test
|
||||
fun canGetAllItems() {
|
||||
for (i in 0 until MinuteOfWeekItems.itemsPerWeek) {
|
||||
MinuteOfWeekItems.getItemAtPosition(i)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun reverseLookupReturnsSameItem() {
|
||||
for (i in 0 until MinuteOfWeekItems.itemsPerWeek) {
|
||||
val item = MinuteOfWeekItems.getItemAtPosition(i)
|
||||
val index = MinuteOfWeekItems.getPositionOfItem(item)
|
||||
|
||||
assertEquals(item.toString(), i, index)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -15,8 +15,8 @@
|
|||
*/
|
||||
|
||||
plugins {
|
||||
id 'com.android.application' version '8.8.0' apply false
|
||||
id 'com.android.library' version '8.8.0' apply false
|
||||
id 'com.android.application' version '8.9.2' apply false
|
||||
id 'com.android.library' version '8.9.2' apply false
|
||||
id 'org.jetbrains.kotlin.android' version "2.0.21" apply false
|
||||
id 'com.google.devtools.ksp' version '1.9.21-1.0.16' apply false
|
||||
id 'androidx.navigation.safeargs' version '2.6.0' apply false
|
||||
|
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -2,5 +2,5 @@ distributionBase=GRADLE_USER_HOME
|
|||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
||||
distributionSha256Sum=2ab88d6de2c23e6adae7363ae6e29cbdd2a709e992929b48b6530fd0c7133bd6
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
|
||||
distributionSha256Sum=89d4e70e4e84e2d2dfbb63e4daa53e21b25017cc70c37e4eea31ee51fb15098a
|
Loading…
Add table
Add a link
Reference in a new issue