1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2024-12-11 22:35:20 +01:00

Compare commits

...

4 Commits

12 changed files with 1788 additions and 1708 deletions

View File

@ -395,6 +395,8 @@
(define-key "n" #'thread-search-next-unread-message *thread-keymap*)
(define-key "C-u" #'thread-search-next-undeleted-message *thread-keymap*)
(define-key "r" #'reply-message *thread-keymap*)
(define-key "right" #'open-next *thread-keymap*)

488
po/ca.po

File diff suppressed because it is too large Load Diff

488
po/de.po

File diff suppressed because it is too large Load Diff

488
po/es.po

File diff suppressed because it is too large Load Diff

488
po/fr.po

File diff suppressed because it is too large Load Diff

476
po/it.po

File diff suppressed because it is too large Load Diff

488
po/pl.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2479,6 +2479,28 @@ Metadata are:
(order-by= query '(:desc :message-index))
(fetch-single query)))
(defun search-next-message-by-status (timeline
folder
start-status-message-index
filter-status-column
filter-status-column-value
&key (account-id nil))
"Search the next unread message belonging
to `timeline' , `folder' and possibly `account-id', older than
`start-status-message-index'"
(let* ((filter-criteria `(:and := ,filter-status-column
,filter-status-column-value))
(query (make-filtered-message-select nil
timeline
folder
account-id
`(:and :> :status.message-index
,start-status-message-index)
filter-criteria)))
(order-by= query :message-index)
(fetch-single query)))
(defun search-next-unread-message (timeline
folder
start-status-message-index
@ -2486,16 +2508,26 @@ Metadata are:
"Search the next unread message belonging
to `timeline' , `folder' and possibly `account-id', older than
`start-status-message-index'"
(let* ((query (make-filtered-message-select nil
timeline
folder
account-id
`(:and :> :status.message-index
,start-status-message-index)
`(:and := :status.redp
,+db-false+))))
(order-by= query :message-index)
(fetch-single query)))
(search-next-message-by-status timeline
folder
start-status-message-index
:status.redp
+db-false+
:account-id account-id))
(defun search-next-undeleted-message (timeline
folder
start-status-message-index
&key (account-id nil))
"Search the next undeleted message belonging
to `timeline' , `folder' and possibly `account-id', older than
`start-status-message-index'"
(search-next-message-by-status timeline
folder
start-status-message-index
:status.deletedp
+db-false+
:account-id account-id))
(defmacro with-add-account-id-to-query ((query query-body) account-id &body body)
`(let ((,query ,query-body))

View File

@ -1087,6 +1087,7 @@
:search-next-message-meta
:search-previous-message-meta
:search-next-unread-message
:search-next-undeleted-message
:last-message-index-status
:last-status-id-timeline-folder
:first-status-id-timeline-folder
@ -2495,6 +2496,7 @@
:search-next-message-meta
:search-previous-message-meta
:search-next-unread
:search-next-undeleted
:add-mention
:remove-mention
:goto-message
@ -3048,6 +3050,7 @@
:thread-search-previous-message-meta
:repeat-search
:thread-search-next-unread-message
:thread-search-next-undeleted-message
:thread-open-selected-message
:thread-mark-delete-selected-message
:thread-mark-prevent-delete-selected-message

View File

@ -1046,21 +1046,32 @@ db:renumber-timeline-message-index."
:previous
(_ "No previous message that contains ~s exists")))
(defmethod search-next-unread ((object thread-window))
(defun search-next-by-status (thread-window searching-function error-message)
(with-accessors ((row-selected-index row-selected-index)
(rows rows)
(timeline-folder timeline-folder)
(timeline-type timeline-type)) object
(a:when-let* ((selected-fields (selected-row-fields object))
(starting-index (db-utils:db-getf selected-fields :message-index)))
(let ((matching-status (db:search-next-unread-message timeline-type
timeline-folder
starting-index)))
(timeline-type timeline-type)) thread-window
(a:when-let* ((selected-fields (selected-row-fields thread-window))
(starting-index (db-utils:db-getf selected-fields :message-index)))
(let ((matching-status (funcall searching-function
timeline-type
timeline-folder
starting-index)))
(if matching-status
(let ((new-message-index (db:row-message-index matching-status)))
(rebuild-lines object new-message-index)
(open-message object))
(ui:info-message (_ "No others unread messages exist")))))))
(rebuild-lines thread-window new-message-index)
(open-message thread-window))
(ui:info-message error-message))))))
(defmethod search-next-unread ((object thread-window))
(search-next-by-status object
#'db:search-next-unread-message
(_ "No others unread message exists")))
(defmethod search-next-undeleted ((object thread-window))
(search-next-by-status object
#'db:search-next-undeleted-message
(_ "No others message marked for deletion exists")))
(defmethod add-mention ((object thread-window) mention)
(with-accessors ((mentions mentions)) object

View File

@ -343,6 +343,10 @@ Metadata includes:
"Jump to next unread message"
(thread-window:search-next-unread *thread-window*))
(defun thread-search-next-undeleted-message ()
"Jump to next undeleted message"
(thread-window:search-next-undeleted *thread-window*))
(defun repeat-search ()
"Repeat the last search performed"
(push-event (make-instance 'search-next-event