mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-09 22:04:24 +01:00
Setting up some debug statements
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
This commit is contained in:
parent
3567eeda74
commit
d164b9f06f
@ -461,6 +461,7 @@ class ConversationInfoActivity :
|
|||||||
viewModel.getProfileViewState.observe(this) { state ->
|
viewModel.getProfileViewState.observe(this) { state ->
|
||||||
when (state) {
|
when (state) {
|
||||||
is ConversationInfoViewModel.GetProfileSuccessState -> {
|
is ConversationInfoViewModel.GetProfileSuccessState -> {
|
||||||
|
try {
|
||||||
// Pronouns
|
// Pronouns
|
||||||
val profile = state.profile
|
val profile = state.profile
|
||||||
val pronouns = profile.pronouns ?: ""
|
val pronouns = profile.pronouns ?: ""
|
||||||
@ -477,7 +478,9 @@ class ConversationInfoActivity :
|
|||||||
val profileZoneOffset = ZoneOffset.ofTotalSeconds(0)
|
val profileZoneOffset = ZoneOffset.ofTotalSeconds(0)
|
||||||
val secondsToAdd = profile.timezoneOffset?.toLong() ?: 0
|
val secondsToAdd = profile.timezoneOffset?.toLong() ?: 0
|
||||||
val localTime = ZonedDateTime.ofInstant(Instant.now().plusSeconds(secondsToAdd), profileZoneOffset)
|
val localTime = ZonedDateTime.ofInstant(Instant.now().plusSeconds(secondsToAdd), profileZoneOffset)
|
||||||
val localTimeString = localTime.format(DateTimeFormatter.ofLocalizedTime(FormatStyle.SHORT))
|
val localTimeString = localTime.format(DateTimeFormatter
|
||||||
|
.ofLocalizedTime(FormatStyle.SHORT)
|
||||||
|
.withLocale(Locale.getDefault()))
|
||||||
val concat2 = if (profile.address != null) " · " else ""
|
val concat2 = if (profile.address != null) " · " else ""
|
||||||
val address = profile.address ?: ""
|
val address = profile.address ?: ""
|
||||||
val localTimeLocation = "$localTimeString$concat2$address"
|
val localTimeLocation = "$localTimeString$concat2$address"
|
||||||
@ -486,6 +489,16 @@ class ConversationInfoActivity :
|
|||||||
binding.pronouns.visibility = VISIBLE
|
binding.pronouns.visibility = VISIBLE
|
||||||
binding.professionCompany.visibility = if (professionCompanyText.isNotEmpty()) VISIBLE else GONE
|
binding.professionCompany.visibility = if (professionCompanyText.isNotEmpty()) VISIBLE else GONE
|
||||||
binding.locationTime.visibility = VISIBLE
|
binding.locationTime.visibility = VISIBLE
|
||||||
|
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Snackbar.make(binding.root, "Exception getting profile information: $e",
|
||||||
|
Snackbar.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is ConversationInfoViewModel.GetProfileErrorState -> {
|
||||||
|
Snackbar.make(binding.root, "Network error occurred getting profile information",
|
||||||
|
Snackbar.LENGTH_SHORT).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {}
|
else -> {}
|
||||||
|
@ -563,9 +563,6 @@ class ConversationsListActivity :
|
|||||||
intArrayOf(ApiUtils.API_V4, ApiUtils.API_V3, 1)
|
intArrayOf(ApiUtils.API_V4, ApiUtils.API_V3, 1)
|
||||||
)
|
)
|
||||||
fetchOpenConversations(apiVersion)
|
fetchOpenConversations(apiVersion)
|
||||||
|
|
||||||
// Get users
|
|
||||||
// fetchUsers()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun applyFilter() {
|
fun applyFilter() {
|
||||||
|
Loading…
Reference in New Issue
Block a user