mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 11:59:12 +03:00
Move clock to core-utils module
This commit is contained in:
parent
757bd5ff32
commit
9a31aa3b91
46 changed files with 58 additions and 55 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2021 New Vector Ltd
|
||||
* Copyright (c) 2023 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -14,15 +14,13 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package im.vector.app.core.time
|
||||
|
||||
import javax.inject.Inject
|
||||
package im.vector.lib.core.utils.timer
|
||||
|
||||
interface Clock {
|
||||
fun epochMillis(): Long
|
||||
}
|
||||
|
||||
class DefaultClock @Inject constructor() : Clock {
|
||||
class DefaultClock : Clock {
|
||||
|
||||
/**
|
||||
* Provides a UTC epoch in milliseconds
|
|
@ -27,12 +27,15 @@ import kotlinx.coroutines.flow.onEach
|
|||
import java.util.concurrent.atomic.AtomicLong
|
||||
|
||||
@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)
|
||||
class CountUpTimer(initialTime: Long = 0L, private val intervalInMs: Long = 1_000) {
|
||||
class CountUpTimer(
|
||||
private val clock: Clock = DefaultClock(),
|
||||
private val intervalInMs: Long = 1_000,
|
||||
initialTime: Long = 0L,
|
||||
) {
|
||||
|
||||
private val coroutineScope = CoroutineScope(Dispatchers.Main)
|
||||
private var counterJob: Job? = null
|
||||
|
||||
private val clock: Clock = DefaultClock()
|
||||
private val lastTime: AtomicLong = AtomicLong()
|
||||
private val elapsedTime: AtomicLong = AtomicLong(initialTime)
|
||||
|
||||
|
|
|
@ -347,6 +347,7 @@ android {
|
|||
dependencies {
|
||||
implementation project(':vector')
|
||||
implementation project(':vector-config')
|
||||
implementation project(':library:core-utils')
|
||||
debugImplementation project(':library:ui-styles')
|
||||
implementation libs.dagger.hilt
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
|
|
|
@ -28,7 +28,6 @@ import dagger.hilt.android.AndroidEntryPoint
|
|||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.registerStartForActivityResult
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.utils.PERMISSIONS_FOR_TAKING_PHOTO
|
||||
import im.vector.app.core.utils.checkPermissions
|
||||
import im.vector.app.core.utils.registerForPermissionsResult
|
||||
|
@ -41,6 +40,7 @@ import im.vector.app.features.debug.sas.DebugSasEmojiActivity
|
|||
import im.vector.app.features.debug.settings.DebugPrivateSettingsActivity
|
||||
import im.vector.app.features.qrcode.QrCodeScannerActivity
|
||||
import im.vector.application.databinding.ActivityDebugMenuBinding
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import im.vector.lib.ui.styles.debug.DebugMaterialThemeDarkDefaultActivity
|
||||
import im.vector.lib.ui.styles.debug.DebugMaterialThemeDarkTestActivity
|
||||
import im.vector.lib.ui.styles.debug.DebugMaterialThemeDarkVectorActivity
|
||||
|
|
|
@ -18,10 +18,10 @@ package im.vector.app.fdroid
|
|||
|
||||
import android.content.Context
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.fdroid.receiver.AlarmSyncBroadcastReceiver
|
||||
import im.vector.app.features.settings.BackgroundSyncMode
|
||||
import im.vector.app.features.settings.VectorPreferences
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import androidx.core.content.getSystemService
|
|||
import im.vector.app.core.extensions.singletonEntryPoint
|
||||
import im.vector.app.core.platform.PendingIntentCompat
|
||||
import im.vector.app.core.services.VectorSyncAndroidService
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import org.matrix.android.sdk.api.session.sync.job.SyncAndroidService
|
||||
import timber.log.Timber
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ import com.google.firebase.appdistribution.FirebaseAppDistribution
|
|||
import com.google.firebase.appdistribution.FirebaseAppDistributionException
|
||||
import im.vector.app.core.di.DefaultPreferences
|
||||
import im.vector.app.core.resources.BuildMeta
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.home.NightlyProxy
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
|
|
|
@ -40,8 +40,6 @@ import im.vector.app.core.dispatchers.CoroutineDispatchers
|
|||
import im.vector.app.core.error.DefaultErrorFormatter
|
||||
import im.vector.app.core.error.ErrorFormatter
|
||||
import im.vector.app.core.resources.BuildMeta
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.time.DefaultClock
|
||||
import im.vector.app.core.utils.AndroidSystemSettingsProvider
|
||||
import im.vector.app.core.utils.SystemSettingsProvider
|
||||
import im.vector.app.features.analytics.AnalyticsTracker
|
||||
|
@ -63,6 +61,8 @@ import im.vector.app.features.settings.VectorPreferences
|
|||
import im.vector.app.features.ui.SharedPreferencesUiStateRepository
|
||||
import im.vector.app.features.ui.UiStateRepository
|
||||
import im.vector.application.BuildConfig
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import im.vector.lib.core.utils.timer.DefaultClock
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
@ -106,9 +106,6 @@ import javax.inject.Singleton
|
|||
@Binds
|
||||
abstract fun bindAutoAcceptInvites(autoAcceptInvites: CompileTimeAutoAcceptInvites): AutoAcceptInvites
|
||||
|
||||
@Binds
|
||||
abstract fun bindDefaultClock(clock: DefaultClock): Clock
|
||||
|
||||
@Binds
|
||||
abstract fun bindEmojiSpanify(emojiCompatWrapper: EmojiCompatWrapper): EmojiSpanify
|
||||
|
||||
|
@ -243,4 +240,8 @@ import javax.inject.Singleton
|
|||
fun providesDefaultSharedPreferences(context: Context): SharedPreferences {
|
||||
return PreferenceManager.getDefaultSharedPreferences(context.applicationContext)
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
fun providesDefaultClock(): Clock = DefaultClock()
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ import android.text.format.DateUtils
|
|||
import im.vector.app.core.resources.DateProvider
|
||||
import im.vector.app.core.resources.LocaleProvider
|
||||
import im.vector.app.core.resources.toTimestamp
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import org.threeten.bp.LocalDateTime
|
||||
import org.threeten.bp.Period
|
||||
import org.threeten.bp.format.DateTimeFormatter
|
||||
|
|
|
@ -21,7 +21,6 @@ import dagger.hilt.InstallIn
|
|||
import dagger.hilt.components.SingletonComponent
|
||||
import im.vector.app.core.dialogs.UnrecognizedCertificateDialog
|
||||
import im.vector.app.core.error.ErrorFormatter
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.analytics.AnalyticsTracker
|
||||
import im.vector.app.features.call.webrtc.WebRtcCallManager
|
||||
import im.vector.app.features.home.AvatarRenderer
|
||||
|
@ -31,6 +30,7 @@ import im.vector.app.features.rageshake.BugReporter
|
|||
import im.vector.app.features.session.SessionListener
|
||||
import im.vector.app.features.settings.VectorPreferences
|
||||
import im.vector.app.features.ui.UiStateRepository
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
|
||||
@InstallIn(SingletonComponent::class)
|
||||
|
|
|
@ -27,12 +27,12 @@ import im.vector.app.core.dialogs.GalleryOrCameraDialogHelper.Listener
|
|||
import im.vector.app.core.extensions.insertBeforeLast
|
||||
import im.vector.app.core.extensions.registerStartForActivityResult
|
||||
import im.vector.app.core.resources.ColorProvider
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.utils.PERMISSIONS_FOR_TAKING_PHOTO
|
||||
import im.vector.app.core.utils.checkPermissions
|
||||
import im.vector.app.core.utils.onPermissionDeniedDialog
|
||||
import im.vector.app.core.utils.registerForPermissionsResult
|
||||
import im.vector.app.features.media.createUCropWithDefaultSettings
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import im.vector.lib.multipicker.MultiPicker
|
||||
import im.vector.lib.multipicker.entity.MultiPickerImageType
|
||||
import java.io.File
|
||||
|
|
|
@ -18,7 +18,7 @@ package im.vector.app.core.dialogs
|
|||
|
||||
import androidx.fragment.app.Fragment
|
||||
import im.vector.app.core.resources.ColorProvider
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,10 +34,10 @@ import dagger.hilt.android.AndroidEntryPoint
|
|||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.startForegroundCompat
|
||||
import im.vector.app.core.platform.PendingIntentCompat
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.time.DefaultClock
|
||||
import im.vector.app.features.notifications.NotificationUtils
|
||||
import im.vector.app.features.settings.BackgroundSyncMode
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import im.vector.lib.core.utils.timer.DefaultClock
|
||||
import org.matrix.android.sdk.api.Matrix
|
||||
import org.matrix.android.sdk.api.session.sync.job.SyncAndroidService
|
||||
import timber.log.Timber
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
package im.vector.app.features.analytics
|
||||
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.analytics.plan.Error
|
||||
import im.vector.lib.core.utils.compat.removeIfCompat
|
||||
import im.vector.lib.core.utils.flow.tickerFlow
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
|
|
|
@ -47,12 +47,12 @@ import im.vector.app.core.extensions.registerStartForActivityResult
|
|||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.core.platform.VectorMenuProvider
|
||||
import im.vector.app.core.resources.ColorProvider
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.utils.OnSnapPositionChangeListener
|
||||
import im.vector.app.core.utils.SnapOnScrollListener
|
||||
import im.vector.app.core.utils.attachSnapHelperWithListener
|
||||
import im.vector.app.databinding.FragmentAttachmentsPreviewBinding
|
||||
import im.vector.app.features.media.createUCropWithDefaultSettings
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import org.matrix.android.sdk.api.extensions.orFalse
|
||||
import org.matrix.android.sdk.api.session.content.ContentAttachmentData
|
||||
|
|
|
@ -19,7 +19,6 @@ package im.vector.app.features.call.conference
|
|||
import im.vector.app.R
|
||||
import im.vector.app.core.network.await
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.utils.ensureProtocol
|
||||
import im.vector.app.core.utils.toBase32String
|
||||
import im.vector.app.features.call.conference.jwt.JitsiJWTFactory
|
||||
|
@ -27,6 +26,7 @@ import im.vector.app.features.displayname.getBestName
|
|||
import im.vector.app.features.raw.wellknown.getElementWellknown
|
||||
import im.vector.app.features.settings.VectorLocaleProvider
|
||||
import im.vector.app.features.themes.ThemeProvider
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import okhttp3.Request
|
||||
import org.jitsi.meet.sdk.JitsiMeetUserInfo
|
||||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||
|
|
|
@ -22,8 +22,8 @@ import android.os.IBinder
|
|||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.core.extensions.startForegroundCompat
|
||||
import im.vector.app.core.services.VectorAndroidService
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.notifications.NotificationUtils
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import javax.inject.Inject
|
||||
|
||||
@AndroidEntryPoint
|
||||
|
|
|
@ -22,8 +22,8 @@ import androidx.lifecycle.ViewModel
|
|||
import com.nulabinc.zxcvbn.Strength
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.platform.WaitingViewData
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.utils.LiveEvent
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import org.matrix.android.sdk.api.MatrixCallback
|
||||
import org.matrix.android.sdk.api.listeners.ProgressListener
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
|
|
|
@ -18,7 +18,6 @@ package im.vector.app.features.crypto.verification
|
|||
import android.content.Context
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.analytics.plan.ViewRoom
|
||||
import im.vector.app.features.displayname.getBestName
|
||||
import im.vector.app.features.home.AvatarRenderer
|
||||
|
@ -27,6 +26,7 @@ import im.vector.app.features.home.room.detail.arguments.TimelineArgs
|
|||
import im.vector.app.features.popup.PopupAlertManager
|
||||
import im.vector.app.features.popup.VerificationVectorAlert
|
||||
import im.vector.lib.core.utils.compat.getParcelableCompat
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
import org.matrix.android.sdk.api.session.crypto.verification.PendingVerificationRequest
|
||||
import org.matrix.android.sdk.api.session.crypto.verification.VerificationService
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
package im.vector.app.features.home
|
||||
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.settings.VectorPreferences
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import javax.inject.Inject
|
||||
|
||||
class SetUnverifiedSessionsAlertShownUseCase @Inject constructor(
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
package im.vector.app.features.home
|
||||
|
||||
import im.vector.app.config.Config
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.VectorFeatures
|
||||
import im.vector.app.features.settings.VectorPreferences
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import javax.inject.Inject
|
||||
|
||||
class ShouldShowUnverifiedSessionsAlertUseCase @Inject constructor(
|
||||
|
|
|
@ -32,7 +32,7 @@ import im.vector.app.core.platform.EmptyViewEvents
|
|||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.core.platform.VectorViewModelAction
|
||||
import im.vector.app.core.session.clientinfo.DeleteUnusedClientInformationUseCase
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import kotlinx.coroutines.flow.combine
|
||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
package im.vector.app.features.home.room.detail
|
||||
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import org.matrix.android.sdk.api.session.events.model.toModel
|
||||
import org.matrix.android.sdk.api.session.room.model.message.MessageContent
|
||||
import org.matrix.android.sdk.api.session.room.model.message.MessageType
|
||||
|
|
|
@ -33,8 +33,8 @@ import com.airbnb.epoxy.EpoxyModel
|
|||
import com.airbnb.epoxy.EpoxyTouchHelperCallback
|
||||
import com.airbnb.epoxy.EpoxyViewHolder
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.themes.ThemeUtils
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import timber.log.Timber
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.min
|
||||
|
|
|
@ -86,7 +86,6 @@ import im.vector.app.core.platform.VectorMenuProvider
|
|||
import im.vector.app.core.platform.showOptimizedSnackbar
|
||||
import im.vector.app.core.resources.ColorProvider
|
||||
import im.vector.app.core.resources.UserPreferencesProvider
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.ui.views.CurrentCallsView
|
||||
import im.vector.app.core.ui.views.CurrentCallsViewPresenter
|
||||
import im.vector.app.core.ui.views.FailedMessagesWarningView
|
||||
|
@ -186,6 +185,7 @@ import im.vector.app.features.widgets.WidgetActivity
|
|||
import im.vector.app.features.widgets.WidgetArgs
|
||||
import im.vector.app.features.widgets.WidgetKind
|
||||
import im.vector.app.features.widgets.permissions.RoomWidgetPermissionBottomSheet
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
|
|
|
@ -29,7 +29,6 @@ import im.vector.app.core.di.hiltMavericksViewModelFactory
|
|||
import im.vector.app.core.extensions.getVectorLastMessageContent
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.analytics.AnalyticsTracker
|
||||
import im.vector.app.features.analytics.extensions.toAnalyticsComposer
|
||||
import im.vector.app.features.analytics.extensions.toAnalyticsJoinedRoom
|
||||
|
@ -52,6 +51,7 @@ import im.vector.app.features.voicebroadcast.model.VoiceBroadcastState
|
|||
import im.vector.app.features.voicebroadcast.model.asVoiceBroadcastEvent
|
||||
import im.vector.app.features.voicebroadcast.usecase.GetVoiceBroadcastStateEventLiveUseCase
|
||||
import im.vector.app.features.voicebroadcast.voiceBroadcastId
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.flow.combine
|
||||
import kotlinx.coroutines.flow.flatMapLatest
|
||||
|
|
|
@ -23,10 +23,10 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
|||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.hardware.vibrate
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.utils.DimensionConverter
|
||||
import im.vector.app.databinding.ViewVoiceMessageRecorderBinding
|
||||
import im.vector.app.features.home.room.detail.timeline.helper.AudioMessagePlaybackTracker
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import im.vector.lib.core.utils.timer.CountUpTimer
|
||||
import javax.inject.Inject
|
||||
import kotlin.math.floor
|
||||
|
|
|
@ -27,7 +27,6 @@ import dagger.hilt.android.AndroidEntryPoint
|
|||
import im.vector.app.R
|
||||
import im.vector.app.core.hardware.vibrate
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.utils.PERMISSIONS_FOR_VOICE_MESSAGE
|
||||
import im.vector.app.core.utils.checkPermissions
|
||||
import im.vector.app.core.utils.onPermissionDeniedSnackbar
|
||||
|
@ -41,6 +40,7 @@ import im.vector.app.features.home.room.detail.composer.MessageComposerViewState
|
|||
import im.vector.app.features.home.room.detail.composer.SendMode
|
||||
import im.vector.app.features.home.room.detail.composer.boolean
|
||||
import im.vector.app.features.home.room.detail.timeline.helper.AudioMessagePlaybackTracker
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import javax.inject.Inject
|
||||
|
||||
@AndroidEntryPoint
|
||||
|
|
|
@ -30,11 +30,11 @@ import im.vector.app.core.epoxy.loadingItem
|
|||
import im.vector.app.core.epoxy.noResultItem
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.core.resources.UserPreferencesProvider
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.ui.list.GenericHeaderItem_
|
||||
import im.vector.app.features.home.AvatarRenderer
|
||||
import im.vector.app.features.home.room.detail.timeline.format.DisplayableEventFormatter
|
||||
import im.vector.lib.core.utils.epoxy.charsequence.toEpoxyCharSequence
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
import org.matrix.android.sdk.api.session.events.model.Content
|
||||
import org.matrix.android.sdk.api.session.events.model.Event
|
||||
|
|
|
@ -31,7 +31,6 @@ import im.vector.app.core.epoxy.LoadingItem_
|
|||
import im.vector.app.core.extensions.localDateTime
|
||||
import im.vector.app.core.extensions.nextOrNull
|
||||
import im.vector.app.core.extensions.prevOrNull
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.home.AvatarRenderer
|
||||
import im.vector.app.features.home.room.detail.JitsiState
|
||||
import im.vector.app.features.home.room.detail.RoomDetailAction
|
||||
|
@ -64,6 +63,7 @@ import im.vector.app.features.media.AttachmentData
|
|||
import im.vector.app.features.media.ImageContentRenderer
|
||||
import im.vector.app.features.media.VideoContentRenderer
|
||||
import im.vector.app.features.settings.VectorPreferences
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
import org.matrix.android.sdk.api.session.events.model.EventType
|
||||
import org.matrix.android.sdk.api.session.events.model.toModel
|
||||
|
|
|
@ -26,13 +26,13 @@ import im.vector.app.core.date.DateFormatKind
|
|||
import im.vector.app.core.date.VectorDateFormatter
|
||||
import im.vector.app.core.resources.ColorProvider
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.ui.list.genericFooterItem
|
||||
import im.vector.app.core.ui.list.genericHeaderItem
|
||||
import im.vector.app.core.ui.list.genericItem
|
||||
import im.vector.app.core.ui.list.genericLoaderItem
|
||||
import im.vector.app.features.html.EventHtmlRenderer
|
||||
import im.vector.lib.core.utils.epoxy.charsequence.toEpoxyCharSequence
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import me.gujun.android.span.span
|
||||
import name.fraser.neil.plaintext.diff_match_patch
|
||||
import org.matrix.android.sdk.api.session.events.model.Event
|
||||
|
|
|
@ -32,7 +32,6 @@ import im.vector.app.core.extensions.getVectorLastMessageContent
|
|||
import im.vector.app.core.files.LocalFilesHelper
|
||||
import im.vector.app.core.resources.ColorProvider
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.utils.DimensionConverter
|
||||
import im.vector.app.core.utils.containsOnlyEmojis
|
||||
import im.vector.app.features.home.room.detail.timeline.TimelineEventController
|
||||
|
@ -83,6 +82,7 @@ import im.vector.app.features.voice.AudioWaveformView
|
|||
import im.vector.app.features.voicebroadcast.isVoiceBroadcast
|
||||
import im.vector.app.features.voicebroadcast.model.MessageVoiceBroadcastInfoContent
|
||||
import im.vector.lib.core.utils.epoxy.charsequence.toEpoxyCharSequence
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import me.gujun.android.span.span
|
||||
import org.matrix.android.sdk.api.MatrixUrls.isMxcUrl
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
|
|
|
@ -31,11 +31,11 @@ import com.airbnb.epoxy.EpoxyModelClass
|
|||
import im.vector.app.R
|
||||
import im.vector.app.core.epoxy.ClickListener
|
||||
import im.vector.app.core.epoxy.onClick
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.home.AvatarRenderer
|
||||
import im.vector.app.features.home.room.detail.RoomDetailAction
|
||||
import im.vector.app.features.home.room.detail.timeline.MessageColorProvider
|
||||
import im.vector.app.features.home.room.detail.timeline.TimelineEventController
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import org.matrix.android.sdk.api.session.crypto.verification.VerificationService
|
||||
import org.matrix.android.sdk.api.session.crypto.verification.VerificationState
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ import im.vector.app.core.date.VectorDateFormatter
|
|||
import im.vector.app.core.resources.DateProvider
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.core.resources.toTimestamp
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.home.AvatarRenderer
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import javax.inject.Inject
|
||||
|
||||
class LiveLocationBottomSheetController @Inject constructor(
|
||||
|
|
|
@ -27,9 +27,9 @@ import im.vector.app.core.epoxy.VectorEpoxyHolder
|
|||
import im.vector.app.core.epoxy.VectorEpoxyModel
|
||||
import im.vector.app.core.epoxy.onClick
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.utils.TextUtils
|
||||
import im.vector.app.features.home.AvatarRenderer
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import im.vector.lib.core.utils.timer.CountUpTimer
|
||||
import org.matrix.android.sdk.api.util.MatrixItem
|
||||
import org.threeten.bp.Duration
|
||||
|
|
|
@ -25,7 +25,6 @@ import im.vector.app.R
|
|||
import im.vector.app.core.extensions.createIgnoredUri
|
||||
import im.vector.app.core.platform.PendingIntentCompat
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.home.HomeActivity
|
||||
import im.vector.app.features.home.room.detail.RoomDetailActivity
|
||||
import im.vector.app.features.home.room.detail.arguments.TimelineArgs
|
||||
|
@ -34,6 +33,7 @@ import im.vector.app.features.location.live.map.LiveLocationMapViewArgs
|
|||
import im.vector.app.features.notifications.NotificationActionIds
|
||||
import im.vector.app.features.notifications.NotificationUtils
|
||||
import im.vector.app.features.themes.ThemeUtils
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ import android.content.Context
|
|||
import androidx.core.net.toUri
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import im.vector.app.core.intent.getMimeTypeFromUri
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.utils.saveMedia
|
||||
import im.vector.app.features.notifications.NotificationUtils
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
import java.io.File
|
||||
|
|
|
@ -21,10 +21,10 @@ import im.vector.app.core.extensions.getVectorLastMessageContent
|
|||
import im.vector.app.core.extensions.takeAs
|
||||
import im.vector.app.core.resources.BuildMeta
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.displayname.getBestName
|
||||
import im.vector.app.features.home.room.detail.timeline.format.DisplayableEventFormatter
|
||||
import im.vector.app.features.home.room.detail.timeline.format.NoticeEventFormatter
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import org.matrix.android.sdk.api.extensions.orFalse
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
import org.matrix.android.sdk.api.session.content.ContentUrlResolver
|
||||
|
|
|
@ -23,11 +23,11 @@ import androidx.core.app.RemoteInput
|
|||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.analytics.AnalyticsTracker
|
||||
import im.vector.app.features.analytics.extensions.toAnalyticsJoinedRoom
|
||||
import im.vector.app.features.analytics.plan.JoinedRoom
|
||||
import im.vector.app.features.session.coroutineScope
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import kotlinx.coroutines.launch
|
||||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
|
|
|
@ -50,7 +50,6 @@ import im.vector.app.core.extensions.createIgnoredUri
|
|||
import im.vector.app.core.platform.PendingIntentCompat
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.core.services.CallAndroidService
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.utils.startNotificationChannelSettingsIntent
|
||||
import im.vector.app.features.MainActivity
|
||||
import im.vector.app.features.call.VectorCallActivity
|
||||
|
@ -65,6 +64,7 @@ import im.vector.app.features.home.room.threads.arguments.ThreadTimelineArgs
|
|||
import im.vector.app.features.settings.VectorPreferences
|
||||
import im.vector.app.features.settings.troubleshoot.TestNotificationReceiver
|
||||
import im.vector.app.features.themes.ThemeUtils
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
|
|
@ -24,7 +24,6 @@ import android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
|
|||
import com.tapadoo.alerter.Alerter
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.utils.isAnimationEnabled
|
||||
import im.vector.app.features.MainActivity
|
||||
import im.vector.app.features.analytics.ui.consent.AnalyticsOptInActivity
|
||||
|
@ -32,6 +31,7 @@ import im.vector.app.features.home.room.list.home.release.ReleaseNotesActivity
|
|||
import im.vector.app.features.pin.PinActivity
|
||||
import im.vector.app.features.signout.hard.SignedOutActivity
|
||||
import im.vector.app.features.themes.ThemeUtils
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import timber.log.Timber
|
||||
import java.lang.ref.WeakReference
|
||||
import javax.inject.Inject
|
||||
|
|
|
@ -31,7 +31,6 @@ import dagger.hilt.android.AndroidEntryPoint
|
|||
import im.vector.app.R
|
||||
import im.vector.app.core.intent.getMimeTypeFromUri
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.utils.saveMedia
|
||||
import im.vector.app.core.utils.shareMedia
|
||||
import im.vector.app.databinding.FragmentRoomUploadsBinding
|
||||
|
@ -39,6 +38,7 @@ import im.vector.app.features.analytics.plan.MobileScreen
|
|||
import im.vector.app.features.home.AvatarRenderer
|
||||
import im.vector.app.features.notifications.NotificationUtils
|
||||
import im.vector.app.features.roomprofile.RoomProfileArgs
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import kotlinx.coroutines.launch
|
||||
import org.matrix.android.sdk.api.util.toMatrixItem
|
||||
import javax.inject.Inject
|
||||
|
|
|
@ -27,12 +27,12 @@ import im.vector.app.R
|
|||
import im.vector.app.core.di.DefaultPreferences
|
||||
import im.vector.app.core.resources.BuildMeta
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.features.VectorFeatures
|
||||
import im.vector.app.features.disclaimer.SHARED_PREF_KEY
|
||||
import im.vector.app.features.home.ShortcutsHandler
|
||||
import im.vector.app.features.homeserver.ServerUrlsRepository
|
||||
import im.vector.app.features.themes.ThemeUtils
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
package im.vector.app.features.settings.devices.v2.list
|
||||
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import java.util.concurrent.TimeUnit
|
||||
import javax.inject.Inject
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ import im.vector.app.core.extensions.registerStartForActivityResult
|
|||
import im.vector.app.core.extensions.safeOpenOutputStream
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.core.platform.VectorMenuProvider
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.app.core.utils.selectTxtFileToWrite
|
||||
import im.vector.app.databinding.FragmentDevtoolKeyrequestsBinding
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||
import javax.inject.Inject
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
package im.vector.app.test.fakes
|
||||
|
||||
import im.vector.app.core.time.Clock
|
||||
import im.vector.lib.core.utils.timer.Clock
|
||||
import io.mockk.every
|
||||
import io.mockk.mockk
|
||||
|
||||
|
|
Loading…
Reference in a new issue