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
514805fc
Unverified
Commit
514805fc
authored
Mar 08, 2019
by
Filipe de Lima Brito
Committed by
GitHub
Mar 08, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 2074_white_empty_avatar
parents
412c7284
28044ea6
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
14 deletions
+34
-14
AboutFragment.kt
...c/main/java/chat/rocket/android/about/ui/AboutFragment.kt
+5
-1
ChatRoomPresenter.kt
...rocket/android/chatroom/presentation/ChatRoomPresenter.kt
+3
-1
ChatRoomsPresenter.kt
...cket/android/chatrooms/presentation/ChatRoomsPresenter.kt
+2
-0
MainActivity.kt
...src/main/java/chat/rocket/android/main/ui/MainActivity.kt
+6
-0
PreferencesFragment.kt
...chat/rocket/android/preferences/ui/PreferencesFragment.kt
+5
-1
ProfilePresenter.kt
...t/rocket/android/profile/presentation/ProfilePresenter.kt
+5
-5
SettingsFragment.kt
.../java/chat/rocket/android/settings/ui/SettingsFragment.kt
+7
-5
strings.xml
app/src/main/res/values-ru-rRU/strings.xml
+1
-1
No files found.
app/src/main/java/chat/rocket/android/about/ui/AboutFragment.kt
View file @
514805fc
...
@@ -34,12 +34,16 @@ class AboutFragment : Fragment() {
...
@@ -34,12 +34,16 @@ class AboutFragment : Fragment() {
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
super
.
onViewCreated
(
view
,
savedInstanceState
)
super
.
onViewCreated
(
view
,
savedInstanceState
)
setupToolbar
()
setupViews
()
setupViews
()
analyticsManager
.
logScreenView
(
ScreenViewEvent
.
About
)
analyticsManager
.
logScreenView
(
ScreenViewEvent
.
About
)
}
}
override
fun
onResume
()
{
super
.
onResume
()
setupToolbar
()
}
private
fun
setupViews
()
{
private
fun
setupViews
()
{
text_version_name
.
text
=
BuildConfig
.
VERSION_NAME
text_version_name
.
text
=
BuildConfig
.
VERSION_NAME
text_build_number
.
text
=
getString
(
text_build_number
.
text
=
getString
(
...
...
app/src/main/java/chat/rocket/android/chatroom/presentation/ChatRoomPresenter.kt
View file @
514805fc
...
@@ -316,16 +316,18 @@ class ChatRoomPresenter @Inject constructor(
...
@@ -316,16 +316,18 @@ class ChatRoomPresenter @Inject constructor(
fun
sendMessage
(
chatRoomId
:
String
,
text
:
String
,
messageId
:
String
?)
{
fun
sendMessage
(
chatRoomId
:
String
,
text
:
String
,
messageId
:
String
?)
{
launchUI
(
strategy
)
{
launchUI
(
strategy
)
{
try
{
try
{
view
.
disableSendMessageButton
()
// ignore message for now, will receive it on the stream
// ignore message for now, will receive it on the stream
if
(
messageId
==
null
)
{
if
(
messageId
==
null
)
{
val
id
=
UUID
.
randomUUID
().
toString
()
val
id
=
UUID
.
randomUUID
().
toString
()
val
username
=
userHelper
.
username
()
val
username
=
userHelper
.
username
()
val
user
=
userHelper
.
user
()
val
newMessage
=
Message
(
val
newMessage
=
Message
(
id
=
id
,
id
=
id
,
roomId
=
chatRoomId
,
roomId
=
chatRoomId
,
message
=
text
,
message
=
text
,
timestamp
=
Instant
.
now
().
toEpochMilli
(),
timestamp
=
Instant
.
now
().
toEpochMilli
(),
sender
=
SimpleUser
(
null
,
username
,
user
name
),
sender
=
SimpleUser
(
user
?.
id
,
user
?.
username
?:
username
,
user
?.
name
),
attachments
=
null
,
attachments
=
null
,
avatar
=
currentServer
.
avatarUrl
(
username
?:
""
),
avatar
=
currentServer
.
avatarUrl
(
username
?:
""
),
channels
=
null
,
channels
=
null
,
...
...
app/src/main/java/chat/rocket/android/chatrooms/presentation/ChatRoomsPresenter.kt
View file @
514805fc
...
@@ -2,6 +2,7 @@ package chat.rocket.android.chatrooms.presentation
...
@@ -2,6 +2,7 @@ package chat.rocket.android.chatrooms.presentation
import
chat.rocket.android.R
import
chat.rocket.android.R
import
chat.rocket.android.chatrooms.adapter.model.RoomUiModel
import
chat.rocket.android.chatrooms.adapter.model.RoomUiModel
import
chat.rocket.android.chatrooms.domain.FetchChatRoomsInteractor
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.db.DatabaseManager
import
chat.rocket.android.db.DatabaseManager
import
chat.rocket.android.db.model.ChatRoomEntity
import
chat.rocket.android.db.model.ChatRoomEntity
...
@@ -116,6 +117,7 @@ class ChatRoomsPresenter @Inject constructor(
...
@@ -116,6 +117,7 @@ class ChatRoomsPresenter @Inject constructor(
retryIO
(
"createDirectMessage($name)"
)
{
retryIO
(
"createDirectMessage($name)"
)
{
withTimeout
(
10000
)
{
withTimeout
(
10000
)
{
createDirectMessage
(
name
)
createDirectMessage
(
name
)
FetchChatRoomsInteractor
(
client
,
dbManager
).
refreshChatRooms
()
}
}
}
}
val
fromTo
=
mutableListOf
(
myself
.
id
,
id
).
apply
{
val
fromTo
=
mutableListOf
(
myself
.
id
,
id
).
apply
{
...
...
app/src/main/java/chat/rocket/android/main/ui/MainActivity.kt
View file @
514805fc
...
@@ -38,6 +38,9 @@ import kotlinx.android.synthetic.main.activity_main.*
...
@@ -38,6 +38,9 @@ import kotlinx.android.synthetic.main.activity_main.*
import
kotlinx.android.synthetic.main.app_bar.*
import
kotlinx.android.synthetic.main.app_bar.*
import
kotlinx.android.synthetic.main.nav_header.view.*
import
kotlinx.android.synthetic.main.nav_header.view.*
import
javax.inject.Inject
import
javax.inject.Inject
import
android.app.NotificationManager
import
android.content.Context
private
const
val
CURRENT_STATE
=
"current_state"
private
const
val
CURRENT_STATE
=
"current_state"
...
@@ -90,6 +93,9 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector,
...
@@ -90,6 +93,9 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector,
presenter
.
toChatList
(
chatRoomId
)
presenter
.
toChatList
(
chatRoomId
)
isFragmentAdded
=
true
isFragmentAdded
=
true
}
}
val
notificationManager
=
getSystemService
(
Context
.
NOTIFICATION_SERVICE
)
as
NotificationManager
notificationManager
.
cancelAll
()
}
}
override
fun
onDestroy
()
{
override
fun
onDestroy
()
{
...
...
app/src/main/java/chat/rocket/android/preferences/ui/PreferencesFragment.kt
View file @
514805fc
...
@@ -38,13 +38,17 @@ class PreferencesFragment : Fragment(), PreferencesView {
...
@@ -38,13 +38,17 @@ class PreferencesFragment : Fragment(), PreferencesView {
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
super
.
onViewCreated
(
view
,
savedInstanceState
)
super
.
onViewCreated
(
view
,
savedInstanceState
)
setupToolbar
()
setupListeners
()
setupListeners
()
presenter
.
loadAnalyticsTrackingInformation
()
presenter
.
loadAnalyticsTrackingInformation
()
analyticsManager
.
logScreenView
(
ScreenViewEvent
.
Preferences
)
analyticsManager
.
logScreenView
(
ScreenViewEvent
.
Preferences
)
}
}
override
fun
onResume
()
{
setupToolbar
()
super
.
onResume
()
}
override
fun
setupAnalyticsTrackingView
(
isAnalyticsTrackingEnabled
:
Boolean
)
{
override
fun
setupAnalyticsTrackingView
(
isAnalyticsTrackingEnabled
:
Boolean
)
{
if
(
BuildConfig
.
FLAVOR
==
"foss"
)
{
if
(
BuildConfig
.
FLAVOR
==
"foss"
)
{
switch_analytics_tracking
.
isChecked
=
false
switch_analytics_tracking
.
isChecked
=
false
...
...
app/src/main/java/chat/rocket/android/profile/presentation/ProfilePresenter.kt
View file @
514805fc
...
@@ -82,7 +82,7 @@ class ProfilePresenter @Inject constructor(
...
@@ -82,7 +82,7 @@ class ProfilePresenter @Inject constructor(
view
.
showLoading
()
view
.
showLoading
()
try
{
try
{
user
?.
id
?.
let
{
id
->
user
?.
id
?.
let
{
id
->
retryIO
{
client
.
updateProfile
(
id
,
email
,
name
,
username
)
}
retryIO
{
client
.
updateProfile
(
userId
=
id
,
email
=
email
,
name
=
name
,
username
=
username
)
}
view
.
showProfileUpdateSuccessfullyMessage
()
view
.
showProfileUpdateSuccessfullyMessage
()
view
.
showProfile
(
view
.
showProfile
(
serverUrl
.
avatarUrl
(
user
.
username
?:
""
),
serverUrl
.
avatarUrl
(
user
.
username
?:
""
),
...
@@ -115,7 +115,7 @@ class ProfilePresenter @Inject constructor(
...
@@ -115,7 +115,7 @@ class ProfilePresenter @Inject constructor(
uriInteractor
.
getInputStream
(
uri
)
uriInteractor
.
getInputStream
(
uri
)
}
}
}
}
user
?.
username
?.
let
{
view
.
reloadUserAvatar
(
it
)
}
user
?.
username
?.
let
{
view
.
reloadUserAvatar
(
serverUrl
.
avatarUrl
(
it
)
)
}
}
catch
(
exception
:
RocketChatException
)
{
}
catch
(
exception
:
RocketChatException
)
{
exception
.
message
?.
let
{
exception
.
message
?.
let
{
view
.
showMessage
(
it
)
view
.
showMessage
(
it
)
...
@@ -143,7 +143,7 @@ class ProfilePresenter @Inject constructor(
...
@@ -143,7 +143,7 @@ class ProfilePresenter @Inject constructor(
}
}
}
}
user
?.
username
?.
let
{
view
.
reloadUserAvatar
(
it
)
}
user
?.
username
?.
let
{
view
.
reloadUserAvatar
(
serverUrl
.
avatarUrl
(
it
)
)
}
}
catch
(
exception
:
RocketChatException
)
{
}
catch
(
exception
:
RocketChatException
)
{
exception
.
message
?.
let
{
exception
.
message
?.
let
{
view
.
showMessage
(
it
)
view
.
showMessage
(
it
)
...
@@ -163,7 +163,7 @@ class ProfilePresenter @Inject constructor(
...
@@ -163,7 +163,7 @@ class ProfilePresenter @Inject constructor(
user
?.
id
?.
let
{
id
->
user
?.
id
?.
let
{
id
->
retryIO
{
client
.
resetAvatar
(
id
)
}
retryIO
{
client
.
resetAvatar
(
id
)
}
}
}
user
?.
username
?.
let
{
view
.
reloadUserAvatar
(
it
)
}
user
?.
username
?.
let
{
view
.
reloadUserAvatar
(
serverUrl
.
avatarUrl
(
it
)
)
}
}
catch
(
exception
:
RocketChatException
)
{
}
catch
(
exception
:
RocketChatException
)
{
exception
.
message
?.
let
{
exception
.
message
?.
let
{
view
.
showMessage
(
it
)
view
.
showMessage
(
it
)
...
...
app/src/main/java/chat/rocket/android/settings/ui/SettingsFragment.kt
View file @
514805fc
...
@@ -2,6 +2,7 @@ package chat.rocket.android.settings.ui
...
@@ -2,6 +2,7 @@ package chat.rocket.android.settings.ui
import
android.content.ActivityNotFoundException
import
android.content.ActivityNotFoundException
import
android.content.Intent
import
android.content.Intent
import
android.net.Uri
import
android.os.Bundle
import
android.os.Bundle
import
android.view.LayoutInflater
import
android.view.LayoutInflater
import
android.view.View
import
android.view.View
...
@@ -128,11 +129,12 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen
...
@@ -128,11 +129,12 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen
}
}
private
fun
contactSupport
()
{
private
fun
contactSupport
()
{
with
(
Intent
(
Intent
.
ACTION_SEND
))
{
val
uriText
=
"mailto:${"
support
@rocket
.
chat
"}"
+
type
=
"message/rfc822"
"?subject="
+
Uri
.
encode
(
getString
(
R
.
string
.
msg_android_app_support
))
+
putExtra
(
Intent
.
EXTRA_EMAIL
,
arrayOf
(
"support@rocket.chat"
))
"&body="
+
Uri
.
encode
(
getDeviceAndAppInformation
())
putExtra
(
Intent
.
EXTRA_SUBJECT
,
getString
(
R
.
string
.
msg_android_app_support
))
putExtra
(
Intent
.
EXTRA_TEXT
,
getDeviceAndAppInformation
())
with
(
Intent
(
Intent
.
ACTION_SENDTO
))
{
data
=
uriText
.
toUri
()
try
{
try
{
startActivity
(
Intent
.
createChooser
(
this
,
getString
(
R
.
string
.
msg_send_email
)))
startActivity
(
Intent
.
createChooser
(
this
,
getString
(
R
.
string
.
msg_send_email
)))
}
catch
(
ex
:
ActivityNotFoundException
)
{
}
catch
(
ex
:
ActivityNotFoundException
)
{
...
...
app/src/main/res/values-ru-rRU/strings.xml
View file @
514805fc
...
@@ -332,7 +332,7 @@
...
@@ -332,7 +332,7 @@
<string
name=
"message_room_changed_privacy"
>
Тип канала изменен на: %1$s пользователем %2$s
</string>
<string
name=
"message_room_changed_privacy"
>
Тип канала изменен на: %1$s пользователем %2$s
</string>
<!-- User Details -->
<!-- User Details -->
<string
name=
"timezone"
>
Часовой пояс
e
</string>
<string
name=
"timezone"
>
Часовой пояс
</string>
<!-- Report -->
<!-- Report -->
<string
name=
"submit"
>
Отправить
</string>
<string
name=
"submit"
>
Отправить
</string>
...
...
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