mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-29 17:59:22 +00:00
Fixed scheduled meetings duration
This commit is contained in:
parent
65a3d0520f
commit
c9c362d570
6 changed files with 8 additions and 8 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
|
|
@ -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]"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue