revisions

This commit is contained in:
pls.153 2024-03-01 17:05:10 +01:00
parent ca999b26a0
commit 8fd39a99bb
2 changed files with 6 additions and 6 deletions

View file

@ -135,16 +135,15 @@
(defun read-radio ()
"Triggers a read on the radio. Will call RECEIVED-FROM-RADIO on success."
(qrun* (qt:read* qt:*cpp*)))
(qt:read* qt:*cpp*))
(defun send-to-radio (to-radio)
"Sends passed TO-RADIO, preceded by a header."
(when *print-json*
(pr:print-json to-radio))
(let ((bytes (pr:serialize-to-bytes to-radio)))
(qrun*
(qt:write* qt:*cpp* (header (length bytes)))
(qt:write* qt:*cpp* bytes))))
(qt:write* qt:*cpp* (header (length bytes)))
(qt:write* qt:*cpp* bytes)))
(defun received-from-radio (bytes &optional notified) ; see Qt
(if notified

View file

@ -12,7 +12,8 @@
(loc:ini)
(if (setting :latest-receiver)
(msg:show-messages)
(qlater (lambda () (q> |currentIndex| ui:*main-view* 0)))) ; 'Group'
(qlater (lambda () (q> |currentIndex| ui:*main-view*
(if (setting :device) 0 2))))) ; 'Group'/'Radios'
(x:when-it (setting :recent-emojis)
(setf *recent-emojis* (mapcar 'qfrom-utf8 x:it))
(q> |model| ui:*recent-emojis* *recent-emojis*))
@ -35,7 +36,7 @@
(defun view-index-changed (index) ; see QML
(when (and (= 1 index)
(not (app:setting :latest-receiver)))
(q> |currentIndex| ui:*main-view* 0))
(q> |currentIndex| ui:*main-view* 0)) ; 'Group'
(q> |visible| ui:*location* (= 0 index))
(q> |visible| ui:*find* (= 1 index))
(q> |interactive| ui:*main-view* (/= 1 index)) ; swipe single message, not view