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
8b385cfb
Commit
8b385cfb
authored
Sep 06, 2018
by
Lucio Maciel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try/catch when warning custom emojis cache
parent
8a1cf8d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
EmojiRepository.kt
...rc/main/java/chat/rocket/android/emoji/EmojiRepository.kt
+13
-4
No files found.
emoji/src/main/java/chat/rocket/android/emoji/EmojiRepository.kt
View file @
8b385cfb
...
...
@@ -3,11 +3,13 @@ package chat.rocket.android.emoji
import
android.content.Context
import
android.content.SharedPreferences
import
android.graphics.Typeface
import
android.util.Log
import
chat.rocket.android.emoji.internal.EmojiCategory
import
chat.rocket.android.emoji.internal.PREF_EMOJI_RECENTS
import
chat.rocket.android.emoji.internal.db.EmojiDatabase
import
chat.rocket.android.emoji.internal.isCustom
import
com.bumptech.glide.Glide
import
com.bumptech.glide.load.engine.GlideException
import
kotlinx.coroutines.experimental.CommonPool
import
kotlinx.coroutines.experimental.launch
import
kotlinx.coroutines.experimental.withContext
...
...
@@ -110,10 +112,17 @@ object EmojiRepository {
val
px
=
context
.
resources
.
getDimensionPixelSize
(
R
.
dimen
.
custom_emoji_large
)
customEmojis
.
forEach
{
val
future
=
Glide
.
with
(
context
)
.
load
(
it
.
url
)
.
submit
(
px
,
px
)
future
.
get
()
try
{
val
future
=
Glide
.
with
(
context
)
.
load
(
it
.
url
)
.
submit
(
px
,
px
)
future
.
get
()
}
catch
(
ex
:
Exception
)
{
Log
.
d
(
"EmojiRepository"
,
"Error fetching custom emoji ${it.shortname}"
,
ex
)
if
(
ex
is
GlideException
)
{
ex
.
logRootCauses
(
"EmojiRepository"
)
}
}
}
}
}
...
...
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