Fixes some contract issues when follow and names are the same.
This commit is contained in:
@@ -257,7 +257,7 @@ open class EditPostViewModel() : ViewModel() {
|
|||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
userSuggestions =
|
userSuggestions =
|
||||||
LocalCache.findUsersStartingWith(lastWord.removePrefix("@"))
|
LocalCache.findUsersStartingWith(lastWord.removePrefix("@"))
|
||||||
.sortedWith(compareBy({ account?.isFollowing(it) }, { it.toBestDisplayName() }))
|
.sortedWith(compareBy({ account?.isFollowing(it) }, { it.toBestDisplayName() }, { it.pubkeyHex }))
|
||||||
.reversed()
|
.reversed()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -693,7 +693,7 @@ open class NewPostViewModel() : ViewModel() {
|
|||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
userSuggestions =
|
userSuggestions =
|
||||||
LocalCache.findUsersStartingWith(lastWord.removePrefix("@"))
|
LocalCache.findUsersStartingWith(lastWord.removePrefix("@"))
|
||||||
.sortedWith(compareBy({ account?.isFollowing(it) }, { it.toBestDisplayName() }))
|
.sortedWith(compareBy({ account?.isFollowing(it) }, { it.toBestDisplayName() }, { it.pubkeyHex }))
|
||||||
.reversed()
|
.reversed()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -716,7 +716,7 @@ open class NewPostViewModel() : ViewModel() {
|
|||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
userSuggestions =
|
userSuggestions =
|
||||||
LocalCache.findUsersStartingWith(lastWord.removePrefix("@"))
|
LocalCache.findUsersStartingWith(lastWord.removePrefix("@"))
|
||||||
.sortedWith(compareBy({ account?.isFollowing(it) }, { it.toBestDisplayName() }))
|
.sortedWith(compareBy({ account?.isFollowing(it) }, { it.toBestDisplayName() }, { it.pubkeyHex }))
|
||||||
.reversed()
|
.reversed()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user