mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-22 03:05:11 +00:00
removed unused event file
This commit is contained in:
parent
82ba0b2615
commit
33d059d002
1 changed files with 0 additions and 23 deletions
|
@ -1,23 +0,0 @@
|
|||
package com.vanced.manager.ui.events
|
||||
|
||||
open class Event<out T>(private val content: T) {
|
||||
|
||||
private var hasBeenHandled = false
|
||||
|
||||
/**
|
||||
* Returns the content and prevents its use again.
|
||||
*/
|
||||
fun getContentIfNotHandled(): T? {
|
||||
return if (hasBeenHandled) {
|
||||
null
|
||||
} else {
|
||||
hasBeenHandled = true
|
||||
content
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the content, even if it's already been handled.
|
||||
*/
|
||||
fun peekContent(): T = content
|
||||
}
|
Loading…
Reference in a new issue