mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-22 08:37:12 +00:00
add defaults to remove/set
This commit is contained in:
parent
e3cb1e4faf
commit
2964586cb9
@ -80,24 +80,24 @@ fun CloudStorage.get(
|
|||||||
|
|
||||||
fun CloudStorage.remove(
|
fun CloudStorage.remove(
|
||||||
key: CloudStorageKey,
|
key: CloudStorageKey,
|
||||||
callback: (result: Result<Boolean>) -> Unit
|
callback: (result: Result<Boolean>) -> Unit = {}
|
||||||
) = removeItem(key) { e, v -> callback(resultsToResult(e, v)) }
|
) = removeItem(key) { e, v -> callback(resultsToResult(e, v)) }
|
||||||
|
|
||||||
fun CloudStorage.remove(
|
fun CloudStorage.remove(
|
||||||
key: String,
|
key: String,
|
||||||
callback: (result: Result<Boolean>) -> Unit
|
callback: (result: Result<Boolean>) -> Unit = {}
|
||||||
) = remove(CloudStorageKey(key), callback)
|
) = remove(CloudStorageKey(key), callback)
|
||||||
|
|
||||||
fun CloudStorage.remove(
|
fun CloudStorage.remove(
|
||||||
keys: Array<CloudStorageKey>,
|
keys: Array<CloudStorageKey>,
|
||||||
callback: (result: Result<Boolean>) -> Unit
|
callback: (result: Result<Boolean>) -> Unit = {}
|
||||||
) = removeItems(
|
) = removeItems(
|
||||||
keys
|
keys
|
||||||
) { e, v -> callback(resultsToResult(e, v)) }
|
) { e, v -> callback(resultsToResult(e, v)) }
|
||||||
|
|
||||||
fun CloudStorage.remove(
|
fun CloudStorage.remove(
|
||||||
keys: Array<String>,
|
keys: Array<String>,
|
||||||
callback: (result: Result<Boolean>) -> Unit
|
callback: (result: Result<Boolean>) -> Unit = {}
|
||||||
) = remove(
|
) = remove(
|
||||||
Array(keys.size) {
|
Array(keys.size) {
|
||||||
CloudStorageKey(keys[it])
|
CloudStorageKey(keys[it])
|
||||||
@ -109,7 +109,7 @@ fun CloudStorage.remove(
|
|||||||
key: String,
|
key: String,
|
||||||
key2: String,
|
key2: String,
|
||||||
vararg otherKeys: String,
|
vararg otherKeys: String,
|
||||||
callback: (result: Result<Boolean>) -> Unit
|
callback: (result: Result<Boolean>) -> Unit = {}
|
||||||
) = remove(
|
) = remove(
|
||||||
arrayOf(key, key2) + otherKeys,
|
arrayOf(key, key2) + otherKeys,
|
||||||
callback
|
callback
|
||||||
|
Loading…
Reference in New Issue
Block a user