diff --git a/app/src/main/java/org/linphone/ui/main/chat/model/EventModel.kt b/app/src/main/java/org/linphone/ui/main/chat/model/EventModel.kt index d24131afd..72be4b6bb 100644 --- a/app/src/main/java/org/linphone/ui/main/chat/model/EventModel.kt +++ b/app/src/main/java/org/linphone/ui/main/chat/model/EventModel.kt @@ -22,4 +22,6 @@ package org.linphone.ui.main.chat.model import androidx.annotation.WorkerThread import org.linphone.core.EventLog -class EventModel @WorkerThread constructor(eventLog: EventLog) +class EventModel @WorkerThread constructor(eventLog: EventLog) { + val text = eventLog.type.name // TODO FIXME: use proper translated string instead +} diff --git a/app/src/main/java/org/linphone/ui/main/settings/viewmodel/AccountProfileViewModel.kt b/app/src/main/java/org/linphone/ui/main/settings/viewmodel/AccountProfileViewModel.kt index 92cb9a800..64f995c6b 100644 --- a/app/src/main/java/org/linphone/ui/main/settings/viewmodel/AccountProfileViewModel.kt +++ b/app/src/main/java/org/linphone/ui/main/settings/viewmodel/AccountProfileViewModel.kt @@ -170,7 +170,11 @@ class AccountProfileViewModel @UiThread constructor() : ViewModel() { copy.pictureUri = null } - accountModel.value?.images?.postValue(arrayListOf(path)) + // Create a new model to force UI to update + val newModel = AccountModel(account) + newModel.images.postValue(arrayListOf(path)) + accountModel.postValue(newModel) + account.params = copy account.refreshRegister() } diff --git a/app/src/main/res/drawable/shape_line_main2_200.xml b/app/src/main/res/drawable/shape_line_main2_200.xml new file mode 100644 index 000000000..532840742 --- /dev/null +++ b/app/src/main/res/drawable/shape_line_main2_200.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/chat_event.xml b/app/src/main/res/layout/chat_event.xml index f190bcaa4..9fbbf998e 100644 --- a/app/src/main/res/layout/chat_event.xml +++ b/app/src/main/res/layout/chat_event.xml @@ -10,15 +10,30 @@ type="org.linphone.ui.main.chat.model.EventModel" /> - + android:layout_marginBottom="5dp" + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp" + android:background="@drawable/shape_line_main2_200" + android:gravity="center" + android:orientation="horizontal"> + + - - + \ No newline at end of file