mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 09:25:49 +03:00
Rename method
to merge
This commit is contained in:
parent
76788892c0
commit
c9c787b11d
5 changed files with 7 additions and 7 deletions
|
@ -70,7 +70,7 @@ class RxSession(private val session: Session) {
|
|||
}
|
||||
}
|
||||
|
||||
fun liveMyDeviceInfo(): Observable<List<DeviceInfo>> {
|
||||
fun liveMyDevicesInfo(): Observable<List<DeviceInfo>> {
|
||||
return session.cryptoService().getLiveMyDevicesInfo().asObservable()
|
||||
.startWithCallable {
|
||||
session.cryptoService().getMyDevicesInfo()
|
||||
|
|
|
@ -100,7 +100,7 @@ class UnknownDeviceDetectorSharedViewModel @AssistedInject constructor(@Assisted
|
|||
|
||||
Observable.combineLatest<List<CryptoDeviceInfo>, List<DeviceInfo>, Optional<PrivateKeysInfo>, List<DeviceDetectionInfo>>(
|
||||
session.rx().liveUserCryptoDevices(session.myUserId),
|
||||
session.rx().liveMyDeviceInfo(),
|
||||
session.rx().liveMyDevicesInfo(),
|
||||
session.rx().liveCrossSigningPrivateKeys(),
|
||||
Function3 { cryptoList, infoList, pInfo ->
|
||||
// Timber.v("## Detector trigger ${cryptoList.map { "${it.deviceId} ${it.trustLevel}" }}")
|
||||
|
|
|
@ -37,10 +37,10 @@ class CrossSigningSettingsViewModel @AssistedInject constructor(@Assisted privat
|
|||
|
||||
init {
|
||||
Observable.combineLatest<List<DeviceInfo>, Optional<MXCrossSigningInfo>, Pair<List<DeviceInfo>, Optional<MXCrossSigningInfo>>>(
|
||||
session.rx().liveMyDeviceInfo(),
|
||||
session.rx().liveMyDevicesInfo(),
|
||||
session.rx().liveCrossSigningInfo(session.myUserId),
|
||||
BiFunction { myDeviceInfo, mxCrossSigningInfo ->
|
||||
(myDeviceInfo to mxCrossSigningInfo)
|
||||
BiFunction { myDevicesInfo, mxCrossSigningInfo ->
|
||||
myDevicesInfo to mxCrossSigningInfo
|
||||
}
|
||||
)
|
||||
.execute { data ->
|
||||
|
|
|
@ -81,7 +81,7 @@ class DeviceVerificationInfoBottomSheetViewModel @AssistedInject constructor(@As
|
|||
copy(deviceInfo = Loading())
|
||||
}
|
||||
|
||||
session.rx().liveMyDeviceInfo()
|
||||
session.rx().liveMyDevicesInfo()
|
||||
.map { devices ->
|
||||
devices.firstOrNull { it.deviceId == deviceId } ?: DeviceInfo(deviceId = deviceId)
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ class DevicesViewModel @AssistedInject constructor(
|
|||
|
||||
Observable.combineLatest<List<CryptoDeviceInfo>, List<DeviceInfo>, List<DeviceFullInfo>>(
|
||||
session.rx().liveUserCryptoDevices(session.myUserId),
|
||||
session.rx().liveMyDeviceInfo(),
|
||||
session.rx().liveMyDevicesInfo(),
|
||||
BiFunction { cryptoList, infoList ->
|
||||
infoList
|
||||
.sortedByDescending { it.lastSeenTs }
|
||||
|
|
Loading…
Reference in a new issue