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
771dadee
Commit
771dadee
authored
Nov 21, 2018
by
Samer Alabi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handled Null Safety Cases
parent
cbc5ce94
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
27 deletions
+28
-27
ChatDetailsFragment.kt
...chat/rocket/android/chatdetails/ui/ChatDetailsFragment.kt
+9
-9
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+2
-2
FavoriteMessagesFragment.kt
...t/android/favoritemessages/ui/FavoriteMessagesFragment.kt
+3
-3
FilesFragment.kt
...c/main/java/chat/rocket/android/files/ui/FilesFragment.kt
+3
-3
MembersFragment.kt
...in/java/chat/rocket/android/members/ui/MembersFragment.kt
+4
-4
MentionsFragment.kt
.../java/chat/rocket/android/mentions/ui/MentionsFragment.kt
+3
-3
PinnedMessagesFragment.kt
...ocket/android/pinnedmessages/ui/PinnedMessagesFragment.kt
+3
-3
fragment_chat_details.xml
app/src/main/res/layout/fragment_chat_details.xml
+1
-0
No files found.
app/src/main/java/chat/rocket/android/chatdetails/ui/ChatDetailsFragment.kt
View file @
771dadee
...
...
@@ -60,8 +60,8 @@ class ChatDetailsFragment: Fragment(), ChatDetailsView {
private
var
chatRoomId
:
String
?
=
null
private
var
chatRoomType
:
String
?
=
null
private
var
isSubscribed
:
Boolean
?
=
null
private
var
disableMenu
:
Boolean
?
=
null
private
var
isSubscribed
:
Boolean
=
true
private
var
disableMenu
:
Boolean
=
false
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
...
...
@@ -91,7 +91,7 @@ class ChatDetailsFragment: Fragment(), ChatDetailsView {
override
fun
displayDetails
(
room
:
ChatDetails
)
{
ui
{
val
text
=
" "
+
room
.
name
val
text
=
room
.
name
name
.
text
=
text
bindImage
(
chatRoomType
!!
)
content_topic
.
text
=
if
(
room
.
topic
.
isNullOrEmpty
())
getString
(
R
.
string
.
msg_no_topic
)
else
room
.
topic
...
...
@@ -115,13 +115,13 @@ class ChatDetailsFragment: Fragment(), ChatDetailsView {
}
private
fun
addOptions
(
adapter
:
ChatDetailsAdapter
)
{
if
(!
disableMenu
!!
)
{
if
(!
disableMenu
)
{
adapter
.
addOption
(
getString
(
R
.
string
.
title_files
),
R
.
drawable
.
ic_files_24dp
)
{
presenter
.
toFiles
(
chatRoomId
!!
)
}
}
if
(
chatRoomType
!=
RoomType
.
DIRECT_MESSAGE
&&
!
disableMenu
!!
)
{
if
(
chatRoomType
!=
RoomType
.
DIRECT_MESSAGE
&&
!
disableMenu
)
{
adapter
.
addOption
(
getString
(
R
.
string
.
msg_mentions
),
R
.
drawable
.
ic_at_black_20dp
)
{
presenter
.
toMentions
(
chatRoomId
!!
)
}
...
...
@@ -158,7 +158,7 @@ class ChatDetailsFragment: Fragment(), ChatDetailsView {
}
private
fun
getDetails
()
{
if
(
isSubscribed
!!
)
if
(
isSubscribed
)
viewModel
.
getDetails
(
chatRoomId
!!
).
observe
(
viewLifecycleOwner
,
Observer
{
details
->
displayDetails
(
details
)
})
...
...
@@ -190,9 +190,9 @@ class ChatDetailsFragment: Fragment(), ChatDetailsView {
}
private
fun
setupToolbar
()
{
with
(
activity
as
ChatDetailsActivity
)
{
setNavigationIcon
(
R
.
drawable
.
ic_close_white_24dp
)
setToolbarTitle
(
getString
(
R
.
string
.
title_channel_details
))
(
activity
as
ChatDetailsActivity
).
let
{
it
.
setNavigationIcon
(
R
.
drawable
.
ic_close_white_24dp
)
it
.
setToolbarTitle
(
getString
(
R
.
string
.
title_channel_details
))
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
771dadee
...
...
@@ -296,8 +296,8 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
super
.
onPrepareOptionsMenu
(
menu
)
}
override
fun
onOptionsItemSelected
(
item
:
MenuItem
?
):
Boolean
{
setOnMenuItemClickListener
(
item
!!
)
override
fun
onOptionsItemSelected
(
item
:
MenuItem
):
Boolean
{
setOnMenuItemClickListener
(
item
)
return
true
}
...
...
app/src/main/java/chat/rocket/android/favoritemessages/ui/FavoriteMessagesFragment.kt
View file @
771dadee
...
...
@@ -116,9 +116,9 @@ class FavoriteMessagesFragment : Fragment(), FavoriteMessagesView {
}
private
fun
setupToolbar
()
{
with
(
activity
as
ChatDetailsActivity
)
{
setToolbarTitle
(
getString
(
R
.
string
.
title_favorite_messages
))
setNavigationIcon
(
R
.
drawable
.
ic_arrow_back_white_24dp
)
(
activity
as
ChatDetailsActivity
).
let
{
it
.
setToolbarTitle
(
getString
(
R
.
string
.
title_favorite_messages
))
it
.
setNavigationIcon
(
R
.
drawable
.
ic_arrow_back_white_24dp
)
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/files/ui/FilesFragment.kt
View file @
771dadee
...
...
@@ -152,9 +152,9 @@ class FilesFragment : Fragment(), FilesView {
}
private
fun
setupToolbar
(
totalFiles
:
Long
)
{
with
(
activity
as
ChatDetailsActivity
)
{
setToolbarTitle
(
getString
(
R
.
string
.
title_files_total
,
totalFiles
))
setNavigationIcon
(
R
.
drawable
.
ic_arrow_back_white_24dp
)
(
activity
as
ChatDetailsActivity
).
let
{
it
.
setToolbarTitle
(
getString
(
R
.
string
.
title_files_total
,
totalFiles
))
it
.
setNavigationIcon
(
R
.
drawable
.
ic_arrow_back_white_24dp
)
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/members/ui/MembersFragment.kt
View file @
771dadee
...
...
@@ -127,13 +127,13 @@ class MembersFragment : Fragment(), MembersView {
}
private
fun
setupToolbar
(
totalMembers
:
Long
?
=
null
)
{
with
(
activity
as
ChatDetailsActivity
)
{
(
activity
as
ChatDetailsActivity
).
let
{
if
(
totalMembers
!=
null
)
{
setToolbarTitle
(
getString
(
R
.
string
.
title_counted_members
,
totalMembers
))
it
.
setToolbarTitle
(
getString
(
R
.
string
.
title_counted_members
,
totalMembers
))
}
else
{
setToolbarTitle
(
getString
(
R
.
string
.
title_members
))
it
.
setToolbarTitle
(
getString
(
R
.
string
.
title_members
))
}
setNavigationIcon
(
R
.
drawable
.
ic_arrow_back_white_24dp
)
it
.
setNavigationIcon
(
R
.
drawable
.
ic_arrow_back_white_24dp
)
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/mentions/ui/MentionsFragment.kt
View file @
771dadee
...
...
@@ -122,9 +122,9 @@ class MentionsFragment : Fragment(), MentionsView {
}
private
fun
setupToolbar
()
{
with
(
activity
as
ChatDetailsActivity
)
{
setToolbarTitle
(
getString
(
R
.
string
.
msg_mentions
))
setNavigationIcon
(
R
.
drawable
.
ic_arrow_back_white_24dp
)
(
activity
as
ChatDetailsActivity
).
let
{
it
.
setToolbarTitle
(
getString
(
R
.
string
.
msg_mentions
))
it
.
setNavigationIcon
(
R
.
drawable
.
ic_arrow_back_white_24dp
)
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/pinnedmessages/ui/PinnedMessagesFragment.kt
View file @
771dadee
...
...
@@ -123,9 +123,9 @@ class PinnedMessagesFragment : Fragment(), PinnedMessagesView {
}
private
fun
setupToolbar
()
{
with
(
activity
as
ChatDetailsActivity
)
{
setToolbarTitle
(
getString
(
R
.
string
.
title_pinned_messages
))
setNavigationIcon
(
R
.
drawable
.
ic_arrow_back_white_24dp
)
(
activity
as
ChatDetailsActivity
).
let
{
it
.
setToolbarTitle
(
getString
(
R
.
string
.
title_pinned_messages
))
it
.
setNavigationIcon
(
R
.
drawable
.
ic_arrow_back_white_24dp
)
}
}
}
\ No newline at end of file
app/src/main/res/layout/fragment_chat_details.xml
View file @
771dadee
...
...
@@ -18,6 +18,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
style=
"@style/ChatDetails.Title.TextView"
android:drawablePadding=
"@dimen/text_view_drawable_padding"
tools:text=
"#important"
/>
<TextView
android:id=
"@+id/title_topic"
...
...
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