mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-22 16:23:50 +00:00
commit
c6ed821934
@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## 0.20.22
|
||||
|
||||
* `Common`:
|
||||
* Add opportunity to create own `Diff` with base constructor
|
||||
|
||||
## 0.20.21
|
||||
|
||||
* `Resources`:
|
||||
|
@ -27,7 +27,7 @@ private inline fun <T> getObject(
|
||||
* @see calculateDiff
|
||||
*/
|
||||
@Serializable
|
||||
data class Diff<T> internal constructor(
|
||||
data class Diff<T> @Warning(warning) constructor(
|
||||
val removed: List<@Serializable(IndexedValueSerializer::class) IndexedValue<T>>,
|
||||
/**
|
||||
* Old-New values pairs
|
||||
@ -36,6 +36,10 @@ data class Diff<T> internal constructor(
|
||||
val added: List<@Serializable(IndexedValueSerializer::class) IndexedValue<T>>
|
||||
) {
|
||||
fun isEmpty(): Boolean = removed.isEmpty() && replaced.isEmpty() && added.isEmpty()
|
||||
|
||||
companion object {
|
||||
private const val warning = "This feature can be changed without any warranties. Use with caution and only in case you know what you are doing"
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> emptyDiff(): Diff<T> = Diff(emptyList(), emptyList(), emptyList())
|
||||
|
@ -15,5 +15,5 @@ crypto_js_version=4.1.1
|
||||
# Project data
|
||||
|
||||
group=dev.inmo
|
||||
version=0.20.21
|
||||
android_code_version=227
|
||||
version=0.20.22
|
||||
android_code_version=228
|
||||
|
Loading…
Reference in New Issue
Block a user