Remove redundant versions.contains(.native) check

This commit is contained in:
Stefan Ceriu
2024-09-13 14:26:41 +03:00
committed by Stefan Ceriu
parent d53e185d81
commit feaaeb5090
@@ -316,9 +316,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
return return
} }
if versions.contains(.native) { if versions.contains(where: \.isProxy) { // Both available, prompt for migration
// Both available, prompt for migration
if versions.contains(where: \.isProxy) {
state.slidingSyncMigrationBannerMode = .show state.slidingSyncMigrationBannerMode = .show
} else { // The proxy has been removed and logout is needed } else { // The proxy has been removed and logout is needed
// Delay setting the alert otherwise it automatically gets dismissed. Same as the crashed last run one // Delay setting the alert otherwise it automatically gets dismissed. Same as the crashed last run one
@@ -333,7 +331,6 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
} }
} }
} }
}
private func markRoomAsFavourite(_ roomID: String, isFavourite: Bool) async { private func markRoomAsFavourite(_ roomID: String, isFavourite: Bool) async {
guard case let .joined(roomProxy) = await userSession.clientProxy.roomForIdentifier(roomID) else { guard case let .joined(roomProxy) = await userSession.clientProxy.roomForIdentifier(roomID) else {