mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-03-30 19:30:06 +02:00
making some code clearer
This commit is contained in:
parent
cd851feffc
commit
f6060ac251
@ -11,10 +11,11 @@ private var cachedEmojiData: MutableList<String>? = null
|
|||||||
* @param context The initiating view's context.
|
* @param context The initiating view's context.
|
||||||
* @param path The path to the asset file.
|
* @param path The path to the asset file.
|
||||||
*/
|
*/
|
||||||
fun parseRawEmojiSpecsFile(
|
fun parseRawEmojiSpecsFile(context: Context, path: String): MutableList<String> {
|
||||||
context: Context, path: String
|
if (cachedEmojiData != null) {
|
||||||
): MutableList<String> {
|
return cachedEmojiData!!
|
||||||
cachedEmojiData?.let { return it }
|
}
|
||||||
|
|
||||||
val emojis = mutableListOf<String>()
|
val emojis = mutableListOf<String>()
|
||||||
var emojiEditorList: MutableList<String>? = null
|
var emojiEditorList: MutableList<String>? = null
|
||||||
|
|
||||||
@ -39,6 +40,7 @@ fun parseRawEmojiSpecsFile(
|
|||||||
if (!line.startsWith("\t")) {
|
if (!line.startsWith("\t")) {
|
||||||
commitEmojiEditorList()
|
commitEmojiEditorList()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assume it is a data line
|
// Assume it is a data line
|
||||||
val data = line.split(";")
|
val data = line.split(";")
|
||||||
if (data.size == 3) {
|
if (data.size == 3) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user