-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for more detailed location changed messages
- Loading branch information
Showing
16 changed files
with
303 additions
and
157 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
...rc/main/kotlin/net/mullvad/mullvadvpn/compose/communication/CustomListActionResultData.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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package net.mullvad.mullvadvpn.compose.communication | ||
|
||
import android.os.Parcelable | ||
import kotlinx.parcelize.Parcelize | ||
import net.mullvad.mullvadvpn.lib.model.CustomListName | ||
|
||
sealed interface CustomListActionResultData : Parcelable { | ||
|
||
sealed interface Success : CustomListActionResultData, Parcelable { | ||
val undo: CustomListAction | ||
|
||
@Parcelize | ||
data class CreatedWithLocations( | ||
val customListName: CustomListName, | ||
val locationNames: List<String>, | ||
override val undo: CustomListAction | ||
) : Success | ||
|
||
@Parcelize | ||
data class Deleted( | ||
val customListName: CustomListName, | ||
override val undo: CustomListAction.Create | ||
) : Success | ||
|
||
@Parcelize | ||
data class Renamed( | ||
val newName: CustomListName, | ||
override val undo: CustomListAction.Rename | ||
) : Success | ||
|
||
@Parcelize | ||
data class LocationAdded( | ||
val customListName: CustomListName, | ||
val locationName: String, | ||
override val undo: CustomListAction | ||
) : Success | ||
|
||
@Parcelize | ||
data class LocationRemoved( | ||
val customListName: CustomListName, | ||
val locationName: String, | ||
override val undo: CustomListAction | ||
) : Success | ||
|
||
@Parcelize | ||
data class LocationChanged( | ||
val customListName: CustomListName, | ||
override val undo: CustomListAction | ||
) : Success | ||
} | ||
|
||
@Parcelize data object GenericError : CustomListActionResultData | ||
} |
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
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.