mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 01:45:22 +00:00
Feature/mentions (#197)
* mention initial implementation * Message conservation
This commit is contained in:
@@ -83,6 +83,8 @@ class ChatViewModel(
|
||||
val hasUnreadPrivateMessages = state.hasUnreadPrivateMessages
|
||||
val showCommandSuggestions: LiveData<Boolean> = state.showCommandSuggestions
|
||||
val commandSuggestions: LiveData<List<CommandSuggestion>> = state.commandSuggestions
|
||||
val showMentionSuggestions: LiveData<Boolean> = state.showMentionSuggestions
|
||||
val mentionSuggestions: LiveData<List<String>> = state.mentionSuggestions
|
||||
val favoritePeers: LiveData<Set<String>> = state.favoritePeers
|
||||
val peerSessionStates: LiveData<Map<String, String>> = state.peerSessionStates
|
||||
val peerFingerprints: LiveData<Map<String, String>> = state.peerFingerprints
|
||||
@@ -351,6 +353,16 @@ class ChatViewModel(
|
||||
return commandProcessor.selectCommandSuggestion(suggestion)
|
||||
}
|
||||
|
||||
// MARK: - Mention Autocomplete
|
||||
|
||||
fun updateMentionSuggestions(input: String) {
|
||||
commandProcessor.updateMentionSuggestions(input, meshService)
|
||||
}
|
||||
|
||||
fun selectMentionSuggestion(nickname: String, currentText: String): String {
|
||||
return commandProcessor.selectMentionSuggestion(nickname, currentText)
|
||||
}
|
||||
|
||||
// MARK: - BluetoothMeshDelegate Implementation (delegated)
|
||||
|
||||
override fun didReceiveMessage(message: BitchatMessage) {
|
||||
|
||||
Reference in New Issue
Block a user