forked from signalapp/Signal-Android
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
97 changed files
with
1,913 additions
and
1,714 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 0 additions & 64 deletions
64
app/src/main/java/org/thoughtcrime/securesms/components/emoji/CompositeEmojiPageModel.java
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
app/src/main/java/org/thoughtcrime/securesms/components/emoji/CompositeEmojiPageModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.thoughtcrime.securesms.components.emoji | ||
|
||
import android.net.Uri | ||
import androidx.annotation.AttrRes | ||
import java.util.LinkedList | ||
|
||
class CompositeEmojiPageModel( | ||
@field:AttrRes @param:AttrRes private val iconAttr: Int, | ||
private val models: List<EmojiPageModel> | ||
) : EmojiPageModel { | ||
|
||
override fun getKey(): String { | ||
return if (models.isEmpty()) "" else models[0].key | ||
} | ||
|
||
override fun getIconAttr(): Int { return iconAttr } | ||
|
||
override fun getEmoji(): List<String> { | ||
val emojis: MutableList<String> = LinkedList() | ||
for (model in models) { | ||
emojis.addAll(model.emoji) | ||
} | ||
return emojis | ||
} | ||
|
||
override fun getDisplayEmoji(): List<Emoji> { | ||
val emojis: MutableList<Emoji> = LinkedList() | ||
for (model in models) { | ||
emojis.addAll(model.displayEmoji) | ||
} | ||
return emojis | ||
} | ||
|
||
override fun hasSpriteMap(): Boolean { return false } | ||
|
||
override fun getSpriteUri(): Uri? { return null } | ||
|
||
override fun isDynamic(): Boolean { return false } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.