mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 03:29:28 +01:00
fix detekt
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
cf27a489e7
commit
40ffa582e3
@ -2890,7 +2890,6 @@ class ChatActivity :
|
|||||||
setActionBarTitle()
|
setActionBarTitle()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2983,9 +2982,6 @@ class ChatActivity :
|
|||||||
|
|
||||||
val titleTextView = popupView.findViewById<TextView>(R.id.event_scheduled)
|
val titleTextView = popupView.findViewById<TextView>(R.id.event_scheduled)
|
||||||
val subtitleTextView = popupView.findViewById<TextView>(R.id.meetingTime)
|
val subtitleTextView = popupView.findViewById<TextView>(R.id.meetingTime)
|
||||||
val deleteConversation = popupView.findViewById<TextView>(R.id.delete_conversation)
|
|
||||||
val archiveConversation = popupView.findViewById<TextView>(R.id.archive_conversation)
|
|
||||||
val unarchiveConversation = popupView.findViewById<TextView>(R.id.unarchive_conversation)
|
|
||||||
|
|
||||||
val popupWindow = PopupWindow(
|
val popupWindow = PopupWindow(
|
||||||
popupView,
|
popupView,
|
||||||
@ -3001,6 +2997,12 @@ class ChatActivity :
|
|||||||
val meetingStatus = showEventSchedule()
|
val meetingStatus = showEventSchedule()
|
||||||
subtitleTextView.text = meetingStatus
|
subtitleTextView.text = meetingStatus
|
||||||
|
|
||||||
|
deleteEventConversation(meetingStatus, popupWindow, popupView)
|
||||||
|
archiveEventConversation(meetingStatus, popupWindow, popupView)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun deleteEventConversation(meetingStatus: String, popupWindow: PopupWindow, popupView: View) {
|
||||||
|
val deleteConversation = popupView.findViewById<TextView>(R.id.delete_conversation)
|
||||||
if (meetingStatus == context.resources.getString(R.string.nc_meeting_ended) &&
|
if (meetingStatus == context.resources.getString(R.string.nc_meeting_ended) &&
|
||||||
currentConversation?.canDeleteConversation == true
|
currentConversation?.canDeleteConversation == true
|
||||||
) {
|
) {
|
||||||
@ -3034,9 +3036,14 @@ class ChatActivity :
|
|||||||
} else {
|
} else {
|
||||||
deleteConversation.visibility = View.GONE
|
deleteConversation.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun archiveEventConversation(meetingStatus: String, popupWindow: PopupWindow, popupView: View) {
|
||||||
|
val archiveConversation = popupView.findViewById<TextView>(R.id.archive_conversation)
|
||||||
|
val unarchiveConversation = popupView.findViewById<TextView>(R.id.unarchive_conversation)
|
||||||
if (meetingStatus == context.resources.getString(R.string.nc_meeting_ended) &&
|
if (meetingStatus == context.resources.getString(R.string.nc_meeting_ended) &&
|
||||||
(Participant.ParticipantType.MODERATOR == currentConversation?.participantType ||
|
(
|
||||||
|
Participant.ParticipantType.MODERATOR == currentConversation?.participantType ||
|
||||||
Participant.ParticipantType.OWNER == currentConversation?.participantType
|
Participant.ParticipantType.OWNER == currentConversation?.participantType
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
@ -3077,7 +3084,6 @@ class ChatActivity :
|
|||||||
}
|
}
|
||||||
popupWindow.dismiss()
|
popupWindow.dismiss()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
archiveConversation.visibility = View.GONE
|
archiveConversation.visibility = View.GONE
|
||||||
|
Loading…
Reference in New Issue
Block a user