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
33d3b5f0
Commit
33d3b5f0
authored
Sep 07, 2018
by
Lucio Maciel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More fixes
parent
d51c48f4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
RocketChatApplication.kt
...ain/java/chat/rocket/android/app/RocketChatApplication.kt
+1
-3
ChatRoomAdapter.kt
...a/chat/rocket/android/chatroom/adapter/ChatRoomAdapter.kt
+1
-1
EmojiRepository.kt
...rc/main/java/chat/rocket/android/emoji/EmojiRepository.kt
+3
-1
No files found.
app/src/main/java/chat/rocket/android/app/RocketChatApplication.kt
View file @
33d3b5f0
...
@@ -25,7 +25,6 @@ import chat.rocket.android.server.domain.GetSettingsInteractor
...
@@ -25,7 +25,6 @@ import chat.rocket.android.server.domain.GetSettingsInteractor
import
chat.rocket.android.server.domain.SITE_URL
import
chat.rocket.android.server.domain.SITE_URL
import
chat.rocket.android.server.domain.TokenRepository
import
chat.rocket.android.server.domain.TokenRepository
import
chat.rocket.android.server.infraestructure.RocketChatClientFactory
import
chat.rocket.android.server.infraestructure.RocketChatClientFactory
import
chat.rocket.android.util.extension.launchUI
import
chat.rocket.android.util.retryIO
import
chat.rocket.android.util.retryIO
import
chat.rocket.android.util.setupFabric
import
chat.rocket.android.util.setupFabric
import
chat.rocket.common.RocketChatException
import
chat.rocket.common.RocketChatException
...
@@ -34,7 +33,6 @@ import com.facebook.drawee.backends.pipeline.DraweeConfig
...
@@ -34,7 +33,6 @@ import com.facebook.drawee.backends.pipeline.DraweeConfig
import
com.facebook.drawee.backends.pipeline.Fresco
import
com.facebook.drawee.backends.pipeline.Fresco
import
com.facebook.imagepipeline.core.ImagePipelineConfig
import
com.facebook.imagepipeline.core.ImagePipelineConfig
import
com.jakewharton.threetenabp.AndroidThreeTen
import
com.jakewharton.threetenabp.AndroidThreeTen
import
dagger.android.AndroidInjector
import
dagger.android.DispatchingAndroidInjector
import
dagger.android.DispatchingAndroidInjector
import
dagger.android.HasActivityInjector
import
dagger.android.HasActivityInjector
import
dagger.android.HasBroadcastReceiverInjector
import
dagger.android.HasBroadcastReceiverInjector
...
@@ -173,7 +171,7 @@ class RocketChatApplication : Application(), HasActivityInjector, HasServiceInje
...
@@ -173,7 +171,7 @@ class RocketChatApplication : Application(), HasActivityInjector, HasServiceInje
* but custom emojis vary according to the its url.
* but custom emojis vary according to the its url.
*/
*/
fun
loadEmojis
()
{
fun
loadEmojis
()
{
EmojiRepository
.
loadTypeface
(
this
)
EmojiRepository
.
init
(
this
)
val
currentServer
=
getCurrentServerInteractor
.
get
()
val
currentServer
=
getCurrentServerInteractor
.
get
()
currentServer
?.
let
{
server
->
currentServer
?.
let
{
server
->
launch
{
launch
{
...
...
app/src/main/java/chat/rocket/android/chatroom/adapter/ChatRoomAdapter.kt
View file @
33d3b5f0
...
@@ -169,7 +169,7 @@ class ChatRoomAdapter(
...
@@ -169,7 +169,7 @@ class ChatRoomAdapter(
}
}
val
minAdditionDate
=
filteredDataSet
.
minBy
{
it
.
message
.
timestamp
}
?:
return
val
minAdditionDate
=
filteredDataSet
.
minBy
{
it
.
message
.
timestamp
}
?:
return
//---In the most cases we will just add new elements to the top of messages heap
//---In the most cases we will just add new elements to the top of messages heap
if
(
minAdditionDate
.
message
.
timestamp
>
this
.
dataSet
[
0
].
message
.
timestamp
)
{
if
(
this
.
dataSet
.
isEmpty
()
||
minAdditionDate
.
message
.
timestamp
>
this
.
dataSet
[
0
].
message
.
timestamp
)
{
this
.
dataSet
.
addAll
(
0
,
filteredDataSet
)
this
.
dataSet
.
addAll
(
0
,
filteredDataSet
)
notifyItemRangeInserted
(
0
,
filteredDataSet
.
size
)
notifyItemRangeInserted
(
0
,
filteredDataSet
.
size
)
return
return
...
...
emoji/src/main/java/chat/rocket/android/emoji/EmojiRepository.kt
View file @
33d3b5f0
...
@@ -314,8 +314,10 @@ object EmojiRepository {
...
@@ -314,8 +314,10 @@ object EmojiRepository {
return
Pair
(
s1
,
s2
)
return
Pair
(
s1
,
s2
)
}
}
fun
loadTypeface
(
context
:
Context
)
{
fun
init
(
context
:
Context
)
{
launch
{
launch
{
db
=
EmojiDatabase
.
getInstance
(
context
)
preferences
=
context
.
getSharedPreferences
(
"emoji"
,
Context
.
MODE_PRIVATE
)
cachedTypeface
=
Typeface
.
createFromAsset
(
context
.
assets
,
"fonts/emojione-android.ttf"
)
cachedTypeface
=
Typeface
.
createFromAsset
(
context
.
assets
,
"fonts/emojione-android.ttf"
)
}
}
}
}
...
...
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