Implemented Source Selector
This commit is contained in:
@@ -22,6 +22,7 @@ import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.view.MenuItem
|
||||
import androidx.core.content.ContextCompat
|
||||
import kotlinx.serialization.json.*
|
||||
import okhttp3.OkHttpClient
|
||||
@@ -142,4 +143,8 @@ operator fun JsonElement.get(tag: String) =
|
||||
this.jsonObject[tag]
|
||||
|
||||
val JsonElement.content
|
||||
get() = this.jsonPrimitive.contentOrNull
|
||||
get() = this.jsonPrimitive.contentOrNull
|
||||
|
||||
fun List<MenuItem>.findMenu(itemID: Int): MenuItem {
|
||||
return first { it.itemId == itemID }
|
||||
}
|
||||
Reference in New Issue
Block a user