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
10387d42
Unverified
Commit
10387d42
authored
Sep 06, 2018
by
Lucio Maciel
Committed by
GitHub
Sep 06, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'beta' into fix/compress-image
parents
2dee6e0a
fbc7df8a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
RocketChatApplication.kt
...ain/java/chat/rocket/android/app/RocketChatApplication.kt
+1
-0
EmojiRepository.kt
...rc/main/java/chat/rocket/android/emoji/EmojiRepository.kt
+11
-1
No files found.
app/src/main/java/chat/rocket/android/app/RocketChatApplication.kt
View file @
10387d42
...
...
@@ -173,6 +173,7 @@ class RocketChatApplication : Application(), HasActivityInjector, HasServiceInje
* but custom emojis vary according to the its url.
*/
fun
loadEmojis
()
{
EmojiRepository
.
loadTypeface
(
this
)
val
currentServer
=
getCurrentServerInteractor
.
get
()
currentServer
?.
let
{
server
->
launch
{
...
...
emoji/src/main/java/chat/rocket/android/emoji/EmojiRepository.kt
View file @
10387d42
...
...
@@ -48,7 +48,11 @@ object EmojiRepository {
this
@EmojiRepository
.
customEmojis
=
customEmojis
val
allEmojis
=
mutableListOf
<
Emoji
>()
db
=
EmojiDatabase
.
getInstance
(
context
)
cachedTypeface
=
Typeface
.
createFromAsset
(
context
.
assets
,
"fonts/emojione-android.ttf"
)
if
(!
::
cachedTypeface
.
isInitialized
)
{
cachedTypeface
=
Typeface
.
createFromAsset
(
context
.
assets
,
"fonts/emojione-android.ttf"
)
}
preferences
=
context
.
getSharedPreferences
(
"emoji"
,
Context
.
MODE_PRIVATE
)
val
stream
=
context
.
assets
.
open
(
path
)
// Load emojis from emojione ttf file temporarily here. We still need to work on them.
...
...
@@ -309,4 +313,10 @@ object EmojiRepository {
val
s2
:
Int
=
((
scalar
-
0
x10000
)
%
0
x400
)
+
0
xDC00
return
Pair
(
s1
,
s2
)
}
fun
loadTypeface
(
context
:
Context
)
{
launch
{
cachedTypeface
=
Typeface
.
createFromAsset
(
context
.
assets
,
"fonts/emojione-android.ttf"
)
}
}
}
\ No newline at end of file
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