Created
October 7, 2023 09:08
-
-
Save gold24park/b122accf9ecb1c9b600f0c8c216404a2 to your computer and use it in GitHub Desktop.
DialogQueue-1
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
interface DialogQueue { | |
fun add(element: DialogQueueElement) | |
enum class Priority { | |
HIGH, | |
MEDIUM, | |
LOW, | |
} | |
} | |
data class DialogQueueElement( | |
val priority: DialogQueue.Priority, | |
val tag: String, | |
val dialogBuilder: (context: Context, dismiss: () -> Unit) -> QueueDialogFragment<*>, | |
): Comparable<DialogQueueElement> { | |
override fun compareTo(other: DialogQueueElement): Int { | |
return priority.compareTo(other.priority) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment