Bug fixes & code improvements
- simplified access to MainActivity - fixed bug where the 'unread' tag wasn't updated - aboutlibraries version bump
This commit is contained in:
@ -71,8 +71,9 @@ class AddIdentityDialogFragment : AppCompatDialogFragment() {
|
||||
Toast.makeText(ctx,
|
||||
R.string.toast_identity_created,
|
||||
Toast.LENGTH_SHORT).show()
|
||||
val mainActivity = MainActivity.getInstance()
|
||||
mainActivity?.addIdentityEntry(identity)
|
||||
MainActivity.apply {
|
||||
addIdentityEntry(identity)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -106,7 +107,7 @@ class AddIdentityDialogFragment : AppCompatDialogFragment() {
|
||||
Toast.makeText(ctx,
|
||||
R.string.toast_chan_created,
|
||||
Toast.LENGTH_SHORT).show()
|
||||
MainActivity.getInstance()?.addIdentityEntry(chan)
|
||||
MainActivity.apply { addIdentityEntry(chan) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -81,9 +81,9 @@ class DeterministicIdentityDialogFragment : AppCompatDialogFragment() {
|
||||
Toast.makeText(context,
|
||||
messageRes,
|
||||
Toast.LENGTH_SHORT).show()
|
||||
MainActivity.getInstance()?.let { mainActivity ->
|
||||
MainActivity.apply {
|
||||
identities.forEach { identity ->
|
||||
mainActivity.addIdentityEntry(identity)
|
||||
addIdentityEntry(identity)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user