Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
de8e048a
Commit
de8e048a
authored
Jan 18, 2019
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if Jitsi is enabled for channels.
parent
8d07f279
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
ChatDetailsFragment.kt
...chat/rocket/android/chatdetails/ui/ChatDetailsFragment.kt
+1
-1
Menu.kt
app/src/main/java/chat/rocket/android/chatdetails/ui/Menu.kt
+15
-7
No files found.
app/src/main/java/chat/rocket/android/chatdetails/ui/ChatDetailsFragment.kt
View file @
de8e048a
...
...
@@ -73,7 +73,7 @@ class ChatDetailsFragment : Fragment(), ChatDetailsView {
private
lateinit
var
viewModel
:
ChatDetailsViewModel
internal
lateinit
var
chatRoomId
:
String
private
lateinit
var
chatRoomType
:
String
internal
lateinit
var
chatRoomType
:
String
private
var
isSubscribed
:
Boolean
=
true
internal
var
isFavorite
:
Boolean
=
false
private
var
disableMenu
:
Boolean
=
false
...
...
app/src/main/java/chat/rocket/android/chatdetails/ui/Menu.kt
View file @
de8e048a
...
...
@@ -4,16 +4,24 @@ import android.view.Menu
import
android.view.MenuItem
import
chat.rocket.android.R
import
chat.rocket.android.server.domain.isJitsiEnabled
import
chat.rocket.android.server.domain.isJitsiEnabledForChannels
import
chat.rocket.common.model.RoomType
import
chat.rocket.common.model.roomTypeOf
internal
fun
ChatDetailsFragment
.
setupMenu
(
menu
:
Menu
)
{
serverUrl
.
get
()
?.
let
{
if
(
settings
.
get
(
it
).
isJitsiEnabled
())
{
menu
.
add
(
Menu
.
NONE
,
MENU_ACTION_VIDEO_CALL
,
Menu
.
NONE
,
R
.
string
.
msg_video_call
).
setIcon
(
R
.
drawable
.
ic_video_24dp
).
setShowAsAction
(
MenuItem
.
SHOW_AS_ACTION_IF_ROOM
)
with
(
settings
.
get
(
it
))
{
if
(
isJitsiEnabled
())
{
if
(
roomTypeOf
(
chatRoomType
)
!
is
RoomType
.
DirectMessage
&&
!
isJitsiEnabledForChannels
())
{
return
}
menu
.
add
(
Menu
.
NONE
,
MENU_ACTION_VIDEO_CALL
,
Menu
.
NONE
,
R
.
string
.
msg_video_call
).
setIcon
(
R
.
drawable
.
ic_video_24dp
).
setShowAsAction
(
MenuItem
.
SHOW_AS_ACTION_IF_ROOM
)
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment