Fix sending typing state when no configured alias
This commit is contained in:
parent
498bee2e20
commit
4587599cf5
1
TODO.md
1
TODO.md
|
@ -15,7 +15,6 @@
|
|||
- Using up/down when sidepane focused
|
||||
- Missing hourglass when changing avatar and applying
|
||||
- Icons on KDE
|
||||
- Send typing state when no alias
|
||||
- Greentext for local echo
|
||||
|
||||
- Show error if uploading avatar fails
|
||||
|
|
|
@ -82,6 +82,14 @@ Rectangle {
|
|||
}
|
||||
|
||||
onTextChanged: {
|
||||
if (Utils.isEmptyObject(aliases)) {
|
||||
writingUserId = Qt.binding(() => chatPage.userId)
|
||||
toSend = text
|
||||
setTyping(Boolean(text))
|
||||
textChangedSinceLostFocus = true
|
||||
return
|
||||
}
|
||||
|
||||
let foundAlias = null
|
||||
|
||||
for (let [user, writing_alias] of Object.entries(aliases)) {
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
function isEmptyObject(obj) {
|
||||
return Object.entries(obj).length === 0 && obj.constructor === Object
|
||||
}
|
||||
|
||||
|
||||
function numberWrapAround(num, max) {
|
||||
return num < 0 ? max + (num % max) : (num % max)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user