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
bf078e7c
Commit
bf078e7c
authored
Apr 30, 2018
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add setting 'Store_Last_Message' for settings retrieval
parent
c176e9fe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
RefreshSettingsInteractor.kt
...rocket/android/server/domain/RefreshSettingsInteractor.kt
+1
-1
SettingsRepository.kt
...a/chat/rocket/android/server/domain/SettingsRepository.kt
+3
-0
No files found.
app/src/main/java/chat/rocket/android/server/domain/RefreshSettingsInteractor.kt
View file @
bf078e7c
...
...
@@ -25,7 +25,7 @@ class RefreshSettingsInteractor @Inject constructor(
HIDE_USER_JOIN
,
HIDE_USER_LEAVE
,
HIDE_TYPE_AU
,
HIDE_MUTE_UNMUTE
,
HIDE_TYPE_RU
,
ALLOW_MESSAGE_DELETING
,
ALLOW_MESSAGE_EDITING
,
ALLOW_MESSAGE_PINNING
,
SHOW_DELETED_STATUS
,
SHOW_EDITED_STATUS
,
WIDE_TILE_310
)
WIDE_TILE_310
,
STORE_LAST_MESSAGE
)
suspend
fun
refresh
(
server
:
String
)
{
withContext
(
CommonPool
)
{
...
...
app/src/main/java/chat/rocket/android/server/domain/SettingsRepository.kt
View file @
bf078e7c
...
...
@@ -49,6 +49,7 @@ const val ALLOW_MESSAGE_EDITING = "Message_AllowEditing"
const
val
SHOW_DELETED_STATUS
=
"Message_ShowDeletedStatus"
const
val
SHOW_EDITED_STATUS
=
"Message_ShowEditedStatus"
const
val
ALLOW_MESSAGE_PINNING
=
"Message_AllowPinning"
const
val
STORE_LAST_MESSAGE
=
"Store_Last_Message"
/*
* Extension functions for Public Settings.
...
...
@@ -57,6 +58,7 @@ const val ALLOW_MESSAGE_PINNING = "Message_AllowPinning"
* ServerPresenter.kt and a extension function to access it
*/
fun
PublicSettings
.
isLdapAuthenticationEnabled
():
Boolean
=
this
[
LDAP_ENABLE
]
?.
value
==
true
fun
PublicSettings
.
isCasAuthenticationEnabled
():
Boolean
=
this
[
CAS_ENABLE
]
?.
value
==
true
fun
PublicSettings
.
casLoginUrl
():
String
=
this
[
CAS_LOGIN_URL
]
?.
value
.
toString
()
fun
PublicSettings
.
isRegistrationEnabledForNewUsers
():
Boolean
=
this
[
ACCOUNT_REGISTRATION
]
?.
value
==
"Public"
...
...
@@ -83,6 +85,7 @@ fun PublicSettings.showEditedStatus(): Boolean = this[SHOW_EDITED_STATUS]?.value
fun
PublicSettings
.
allowedMessagePinning
():
Boolean
=
this
[
ALLOW_MESSAGE_PINNING
]
?.
value
==
true
fun
PublicSettings
.
allowedMessageEditing
():
Boolean
=
this
[
ALLOW_MESSAGE_EDITING
]
?.
value
==
true
fun
PublicSettings
.
allowedMessageDeleting
():
Boolean
=
this
[
ALLOW_MESSAGE_DELETING
]
?.
value
==
true
fun
PublicSettings
.
showLastMessage
():
Boolean
=
this
[
STORE_LAST_MESSAGE
]
?.
value
==
true
fun
PublicSettings
.
uploadMimeTypeFilter
():
Array
<
String
>
{
val
values
=
this
[
UPLOAD_WHITELIST_MIMETYPES
]
?.
value
...
...
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