Fixed scheduled meetings duration

This commit is contained in:
Sylvain Berfini 2024-05-03 15:07:20 +02:00
parent 65a3d0520f
commit c9c362d570
6 changed files with 8 additions and 8 deletions

View file

@ -606,7 +606,7 @@ class MessageModel @WorkerThread constructor(
hideYear = false
)
val startTime = TimestampUtils.timeToString(timestamp)
val end = timestamp + duration
val end = timestamp + (duration * 60)
val endTime = TimestampUtils.timeToString(end)
meetingDate.postValue(date)
meetingTime.postValue("$startTime - $endTime")

View file

@ -49,7 +49,7 @@ class MeetingModel @WorkerThread constructor(val conferenceInfo: ConferenceInfo)
private val startTime = TimestampUtils.timeToString(timestamp)
private val endTime = TimestampUtils.timeToString(timestamp + conferenceInfo.duration)
private val endTime = TimestampUtils.timeToString(timestamp + (conferenceInfo.duration * 60))
val time = "$startTime - $endTime"

View file

@ -208,7 +208,7 @@ class MeetingViewModel @UiThread constructor() : ViewModel() {
hideYear = false
)
val startTime = TimestampUtils.timeToString(timestamp)
val end = timestamp + duration
val end = timestamp + (duration * 60)
val endTime = TimestampUtils.timeToString(end)
startTimeStamp.postValue(timestamp * 1000)
endTimeStamp.postValue(end * 1000)

View file

@ -397,7 +397,7 @@ class MeetingWaitingRoomViewModel @UiThread constructor() : ViewModel() {
hideYear = false
)
val startTime = TimestampUtils.timeToString(timestamp)
val end = timestamp + duration
val end = timestamp + (duration * 60)
val endTime = TimestampUtils.timeToString(end)
dateTime.postValue("$date | $startTime - $endTime")

View file

@ -363,7 +363,7 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
val startTime = startTimestamp / 1000 // Linphone expects timestamp in seconds
conferenceInfo.dateTime = startTime
val duration = ((endTimestamp - startTimestamp) / 1000).toInt() // Linphone expects duration in seconds
val duration = (((endTimestamp - startTimestamp) / 1000) / 60).toInt() // Linphone expects duration in minutes
conferenceInfo.duration = duration
val participantsList = participants.value.orEmpty()
@ -415,7 +415,7 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
val startTime = startTimestamp / 1000 // Linphone expects timestamp in seconds
conferenceInfo.dateTime = startTime
val duration = ((endTimestamp - startTimestamp) / 1000).toInt() // Linphone expects duration in seconds
val duration = (((endTimestamp - startTimestamp) / 1000) / 60).toInt() // Linphone expects duration in minutes
conferenceInfo.duration = duration
val participantsList = participants.value.orEmpty()
@ -462,7 +462,7 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
endMinutes = 0
startTimestamp = conferenceInfo.dateTime * 1000 /* Linphone timestamps are in seconds */
endTimestamp =
(conferenceInfo.dateTime + conferenceInfo.duration) * 1000 /* Linphone timestamps are in seconds */
(conferenceInfo.dateTime + conferenceInfo.duration * 60) * 1000 /* Linphone timestamps are in seconds */
Log.i(
"$TAG Loaded start date is [$startTimestamp], loaded end date is [$endTimestamp]"
)

View file

@ -99,7 +99,7 @@
android:onClick="@{openFilePickerClickListener}"
android:padding="8dp"
android:src="@drawable/paperclip"
android:contentDescription="@string/content_description_chat_attach_media"
android:contentDescription="@string/content_description_chat_open_attach_media"
app:layout_constraintBottom_toBottomOf="@id/message_area_background"
app:layout_constraintEnd_toStartOf="@id/capture_image"
app:layout_constraintStart_toEndOf="@id/emoji_picker_toggle"