mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01:00
add logging and toasts if current user was null
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
e9dbcc554a
commit
f73d1c14fc
@ -324,9 +324,9 @@ class AccountVerificationController(args: Bundle? = null) :
|
||||
}
|
||||
if (!TextUtils.isEmpty(displayName)) {
|
||||
storeProfile(
|
||||
displayName, userProfileOverall.ocs!!.data!!.userId!!,
|
||||
capabilities.ocs!!.data!!
|
||||
.capabilities!!
|
||||
displayName,
|
||||
userProfileOverall.ocs!!.data!!.userId!!,
|
||||
capabilities.ocs!!.data!!.capabilities!!
|
||||
)
|
||||
} else {
|
||||
if (activity != null) {
|
||||
|
@ -209,8 +209,8 @@ class ConversationsListController(bundle: Bundle) :
|
||||
private fun loadUserAvatar(
|
||||
target: Target
|
||||
) {
|
||||
|
||||
if (activity != null) {
|
||||
if (currentUser != null) {
|
||||
val url = ApiUtils.getUrlForAvatar(
|
||||
currentUser!!.baseUrl,
|
||||
currentUser!!.userId,
|
||||
@ -229,6 +229,10 @@ class ConversationsListController(bundle: Bundle) :
|
||||
.target(target)
|
||||
.build()
|
||||
)
|
||||
} else {
|
||||
Log.e(TAG, "currentUser was null in loadUserAvatar")
|
||||
Toast.makeText(context, R.string.nc_common_error_sorry, Toast.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -238,6 +242,7 @@ class ConversationsListController(bundle: Bundle) :
|
||||
override fun onStart(placeholder: Drawable?) {
|
||||
button.icon = placeholder
|
||||
}
|
||||
|
||||
override fun onSuccess(result: Drawable) {
|
||||
button.icon = result
|
||||
}
|
||||
@ -251,6 +256,7 @@ class ConversationsListController(bundle: Bundle) :
|
||||
override fun onStart(placeholder: Drawable?) {
|
||||
menuItem.icon = placeholder
|
||||
}
|
||||
|
||||
override fun onSuccess(result: Drawable) {
|
||||
menuItem.icon = result
|
||||
}
|
||||
@ -288,6 +294,9 @@ class ConversationsListController(bundle: Bundle) :
|
||||
.colorMaterialTextButton((activity as MainActivity?)!!.binding.switchAccountButton)
|
||||
}
|
||||
fetchRooms()
|
||||
} else {
|
||||
Log.e(TAG, "currentUser was null in ConversationsListController.onAttach")
|
||||
Toast.makeText(context, R.string.nc_common_error_sorry, Toast.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user