Skip to content

Commit 5182760

Browse files
committed
Rename device creation date
1 parent 844e0e5 commit 5182760

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/MtuComposeCell.kt

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package net.mullvad.mullvadvpn.compose.cell
22

33
import androidx.compose.foundation.layout.Row
4-
import androidx.compose.foundation.layout.wrapContentHeight
54
import androidx.compose.material3.MaterialTheme
65
import androidx.compose.material3.Text
76
import androidx.compose.runtime.Composable

android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/DeviceListScreen.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ private fun DeviceListItem(device: Device, isLoading: Boolean, onDeviceRemovalCl
346346
)
347347
Text(
348348
modifier = Modifier.fillMaxWidth(),
349-
text = stringResource(id = R.string.created_x, device.created.formatDate()),
349+
text = stringResource(id = R.string.created_x, device.creationDate.formatDate()),
350350
style = MaterialTheme.typography.listItemSubText,
351351
color =
352352
MaterialTheme.colorScheme.onPrimary

android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/DeviceListViewModel.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class DeviceListViewModel(
3636
val uiSideEffect = _uiSideEffect.receiveAsFlow()
3737

3838
val uiState: StateFlow<DeviceListUiState> =
39-
combine(loadingDevices, deviceList.map { it.sortedBy { it.created } }, loading, error) {
39+
combine(loadingDevices, deviceList.map { it.sortedBy { it.creationDate } }, loading, error) {
4040
loadingDevices,
4141
devices,
4242
loading,

android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/NewDeviceUseNotificationCaseTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class NewDeviceUseNotificationCaseTest {
3030
Device(
3131
id = DeviceId.fromString(UUID.randomUUID().toString()),
3232
name = deviceName,
33-
created = DateTime.now()
33+
creationDate = DateTime.now()
3434
)
3535
)
3636
private lateinit var newDeviceNotificationUseCase: NewDeviceNotificationUseCase

android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/AccountViewModelTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class AccountViewModelTest {
4646
Device(
4747
id = DeviceId.fromString(java.util.UUID.randomUUID().toString()),
4848
name = "fake_name",
49-
created = DateTime.now()
49+
creationDate = DateTime.now()
5050
)
5151
private val dummyAccountToken: AccountToken =
5252
AccountToken(

android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/Device.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import kotlinx.parcelize.Parcelize
55
import org.joda.time.DateTime
66

77
@Parcelize
8-
data class Device(val id: DeviceId, private val name: String, val created: DateTime) : Parcelable {
8+
data class Device(val id: DeviceId, private val name: String, val creationDate: DateTime) :
9+
Parcelable {
910
fun displayName(): String =
1011
name.split(" ").joinToString(" ") { word ->
1112
word.replaceFirstChar { firstChar -> firstChar.uppercase() }

android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadVpnService.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import net.mullvad.mullvadvpn.lib.model.TunnelState
2727
import net.mullvad.mullvadvpn.lib.shared.ConnectionProxy
2828
import net.mullvad.mullvadvpn.service.di.apiEndpointModule
2929
import net.mullvad.mullvadvpn.service.di.vpnServiceModule
30-
import net.mullvad.mullvadvpn.service.notifications.NotificationChannelFactory
3130
import net.mullvad.mullvadvpn.service.notifications.ForegroundNotificationManager
31+
import net.mullvad.mullvadvpn.service.notifications.NotificationChannelFactory
3232
import net.mullvad.mullvadvpn.service.notifications.NotificationManager
3333
import net.mullvad.mullvadvpn.service.notifications.ShouldBeOnForegroundProvider
3434
import net.mullvad.talpid.TalpidVpnService

android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/NotificationChannelFactory.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import android.content.res.Resources
55
import androidx.core.app.NotificationChannelCompat
66
import androidx.core.app.NotificationManagerCompat
77
import net.mullvad.mullvadvpn.lib.common.R
8-
import net.mullvad.mullvadvpn.lib.model.NotificationChannelId
98
import net.mullvad.mullvadvpn.lib.model.NotificationChannel
9+
import net.mullvad.mullvadvpn.lib.model.NotificationChannelId
1010

1111
class NotificationChannelFactory(
1212
private val notificationManagerCompat: NotificationManagerCompat,

android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/accountexpiry/AccountExpiryNotificationProvider.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package net.mullvad.mullvadvpn.service.notifications.accountexpiry
33
import kotlinx.coroutines.flow.Flow
44
import kotlinx.coroutines.flow.combine
55
import kotlinx.coroutines.flow.filterNotNull
6-
import net.mullvad.mullvadvpn.lib.model.NotificationChannelId
76
import net.mullvad.mullvadvpn.lib.model.DeviceState
87
import net.mullvad.mullvadvpn.lib.model.Notification
8+
import net.mullvad.mullvadvpn.lib.model.NotificationChannelId
99
import net.mullvad.mullvadvpn.lib.model.NotificationId
1010
import net.mullvad.mullvadvpn.lib.model.NotificationUpdate
1111
import net.mullvad.mullvadvpn.lib.shared.AccountRepository

android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/tunnelstate/TunnelStateNotificationProvider.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import kotlinx.coroutines.flow.map
1111
import kotlinx.coroutines.flow.onStart
1212
import kotlinx.coroutines.flow.stateIn
1313
import net.mullvad.mullvadvpn.lib.model.ActionAfterDisconnect
14-
import net.mullvad.mullvadvpn.lib.model.NotificationChannelId
1514
import net.mullvad.mullvadvpn.lib.model.DeviceState
1615
import net.mullvad.mullvadvpn.lib.model.ErrorStateCause
1716
import net.mullvad.mullvadvpn.lib.model.Notification
1817
import net.mullvad.mullvadvpn.lib.model.NotificationAction
18+
import net.mullvad.mullvadvpn.lib.model.NotificationChannelId
1919
import net.mullvad.mullvadvpn.lib.model.NotificationId
2020
import net.mullvad.mullvadvpn.lib.model.NotificationTunnelState
2121
import net.mullvad.mullvadvpn.lib.model.NotificationUpdate

0 commit comments

Comments
 (0)