-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-Authored-By: Boban Sijuk <[email protected]>
- Loading branch information
1 parent
3ae3874
commit 9f6dfe0
Showing
8 changed files
with
238 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 11 additions & 4 deletions
15
android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/state/SelectLocationUiState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
package net.mullvad.mullvadvpn.compose.state | ||
|
||
import net.mullvad.mullvadvpn.model.Ownership | ||
import net.mullvad.mullvadvpn.relaylist.RelayCountry | ||
import net.mullvad.mullvadvpn.relaylist.RelayItem | ||
|
||
sealed interface SelectLocationUiState { | ||
data object Loading : SelectLocationUiState | ||
|
||
data class ShowData(val countries: List<RelayCountry>, val selectedRelay: RelayItem?) : | ||
SelectLocationUiState | ||
data object Loading : SelectLocationUiState | ||
|
||
data class NoSearchResultFound(val searchTerm: String) : SelectLocationUiState | ||
data class ShowData( | ||
val searchTerm: String, | ||
val countries: List<RelayCountry>, | ||
val selectedRelay: RelayItem?, | ||
val selectedOwnership: Ownership?, | ||
val selectedProvidersCount: Int? | ||
) : SelectLocationUiState { | ||
val hasFilter: Boolean = (selectedProvidersCount != null || selectedOwnership != null) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.