refactor: add more else branches for unimplemented types

This commit is contained in:
0x330a 2023-02-22 17:22:29 +11:00
parent 6006715b74
commit 055d37db5f
No known key found for this signature in database
GPG Key ID: 267811D6E6A2698C

View File

@ -117,6 +117,7 @@ class ConfigFactory(private val context: Context,
is UserProfile -> persistUserConfigDump() is UserProfile -> persistUserConfigDump()
is Contacts -> persistContactsConfigDump() is Contacts -> persistContactsConfigDump()
is ConversationVolatileConfig -> persistConvoVolatileConfigDump() is ConversationVolatileConfig -> persistConvoVolatileConfigDump()
else -> throw UnsupportedOperationException("Can't support type of ${forConfigObject::class.simpleName} yet")
} }
} }
@ -125,6 +126,7 @@ class ConfigFactory(private val context: Context,
is UserProfile -> userHashes.add(hash) is UserProfile -> userHashes.add(hash)
is Contacts -> contactsHashes.add(hash) is Contacts -> contactsHashes.add(hash)
is ConversationVolatileConfig -> convoHashes.add(hash) is ConversationVolatileConfig -> convoHashes.add(hash)
else -> throw UnsupportedOperationException("Can't support type of ${configObject::class.simpleName} yet")
} }
} }