Skip to content

Commit

Permalink
revert: [android] assert cannot register empty client*
Browse files Browse the repository at this point in the history
Current implementation on all platforms allowed, to support existing implementation this assertion is reverted.
  • Loading branch information
cybex-dev committed Oct 19, 2023
1 parent 75b4fed commit 323767b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,17 @@ class StorageImpl(ctx: Context) : Storage {
}

override fun addRegisteredClient(id: String, name: String): Boolean {
assert(id.isNotEmpty()) { "addRegisteredClient: id cannot be empty" }
// TODO: remove this assert, it's not needed now.
// assert(id.isNotEmpty()) { "addRegisteredClient: id cannot be empty" }
prefs.let {
val editor = it.edit()
return editor.putString(id, name).commit()
}
}

override fun removeRegisteredClient(id: String): Boolean {
assert(id.isNotEmpty()) { "removeRegisteredClient: id cannot be empty" }
// TODO: remove this assert, it's not needed now.
// assert(id.isNotEmpty()) { "removeRegisteredClient: id cannot be empty" }
prefs.let {
val editor = it.edit()
return editor.remove(id).commit()
Expand Down

0 comments on commit 323767b

Please sign in to comment.