Rename method

to merge
This commit is contained in:
Benoit Marty 2020-08-13 16:24:37 +02:00
parent 76788892c0
commit c9c787b11d
5 changed files with 7 additions and 7 deletions

View file

@ -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()

View file

@ -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}" }}")

View file

@ -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 ->

View file

@ -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)
}

View file

@ -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 }