diff options
| author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-03-24 10:17:46 +0100 | 
|---|---|---|
| committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-03-24 10:17:46 +0100 | 
| commit | 10968bd76b9cb00a80ed6a4d84db0d5f04873cc8 (patch) | |
| tree | 934902d51e13c057c14e405234ba8da6bdef7b22 | |
| parent | 51ebf711241333195756865034c15391bf54f401 (diff) | |
| parent | 93ef38d88b277e8d5991e887034a7622879c91b1 (diff) | |
Merge branch 'develop'
| -rw-r--r-- | lisp/mastodon-profile.el | 10 | ||||
| -rw-r--r-- | lisp/mastodon-search.el | 16 | ||||
| -rw-r--r-- | lisp/mastodon-tl.el | 21 | ||||
| -rw-r--r-- | lisp/mastodon-toot.el | 7 | ||||
| -rw-r--r-- | lisp/mastodon-views.el | 19 | 
5 files changed, 42 insertions, 31 deletions
| diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 74f9b62..7fb36ad 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -642,7 +642,7 @@ HEADERS means also fetch link headers for pagination."               (if (equal locked t)                   (concat " " (mastodon-tl--symbol 'locked))                 "") -             "\n ------------\n" +             "\n " mastodon-tl--horiz-bar "\n"               ;; profile note:               ;; account here to enable tab-stops in profile note               (mastodon-tl--render-text note account) @@ -662,11 +662,11 @@ HEADERS means also fetch link headers for pagination."              'profile-json account)             ;; insert counts             (mastodon-tl--set-face -            (concat " ------------\n" +            (concat " " mastodon-tl--horiz-bar "\n"                      " TOOTS: " toots-count " | "                      "FOLLOWERS: " followers-count " | "                      "FOLLOWING: " following-count "\n" -                    " ------------\n\n") +                    " " mastodon-tl--horiz-bar "\n\n")              'success)             ;; insert relationship (follows)             (if followsp @@ -682,9 +682,9 @@ HEADERS means also fetch link headers for pagination."               "") ; if no followsp we still need str-or-char-p for insert             ;; insert endpoint             (mastodon-tl--set-face -            (concat " ------------\n" +            (concat " " mastodon-tl--horiz-bar "\n"                      endpoint-name "\n" -                    " ------------\n") +                    " " mastodon-tl--horiz-bar "\n")              'success))            (setq mastodon-tl--update-point (point))            (mastodon-media--inline-images (point-min) (point)) diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index b5900c7..3555238 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -97,9 +97,9 @@ QUERY is the string to search."                                        nil)          ;; hashtag results:          (insert (mastodon-tl--set-face -                 (concat "\n ------------\n" +                 (concat "\n " mastodon-tl--horiz-bar "\n"                           " TRENDING HASHTAGS\n" -                         " ------------\n\n") +                         " " mastodon-tl--horiz-bar "\n\n")                   'success))          (mastodon-search--print-tags-list tags))))) @@ -135,23 +135,23 @@ QUERY is the string to search."                                        nil)          ;; user results:          (insert (mastodon-tl--set-face -                 (concat "\n ------------\n" +                 (concat "\n " mastodon-tl--horiz-bar "\n"                           " USERS\n" -                         " ------------\n\n") +                         " " mastodon-tl--horiz-bar "\n\n")                   'success))          (mastodon-search--insert-users-propertized accts :note)          ;; hashtag results:          (insert (mastodon-tl--set-face -                 (concat "\n ------------\n" +                 (concat "\n " mastodon-tl--horiz-bar "\n"                           " HASHTAGS\n" -                         " ------------\n\n") +                         " " mastodon-tl--horiz-bar "\n\n")                   'success))          (mastodon-search--print-tags-list tags-list)          ;; status results:          (insert (mastodon-tl--set-face -                 (concat "\n ------------\n" +                 (concat "\n " mastodon-tl--horiz-bar "\n"                           " STATUSES\n" -                         " ------------\n") +                         " " mastodon-tl--horiz-bar "\n")                   'success))          (mapc #'mastodon-tl--toot toots-list-json)          (goto-char (point-min)))))) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index f557282..fbee377 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -189,6 +189,10 @@ If nil `(point-min)' is used instead.")  (defvar-local mastodon-tl--timestamp-update-timer nil    "The timer that, when set will scan the buffer to update the timestamps.") +(defvar mastodon-tl--horiz-bar +  (if (char-displayable-p ?―) +      (make-string 12 ?―) +    (make-string 12 ?-)))  ;;; KEYMAPS @@ -625,7 +629,8 @@ this just means displaying toot client."                            (mastodon-tl--relative-time-description edited-parsed)                          edited-parsed)))           "") -       (propertize "\n  ------------" 'face 'default) +       (propertize (concat "\n  " mastodon-tl--horiz-bar) +                   'face 'default)         (if mastodon-tl--show-stats             (mastodon-tl--toot-stats toot)           "") @@ -962,13 +967,13 @@ message is a link which unhides/hides the main body."                    (mastodon-tl--clean-tabs-and-nl                     (mastodon-tl--render-text spoiler toot))                    'default)) -         (message (concat ;"\n" -                   " ---------------\n" -                   " " (mastodon-tl--make-link -                        (concat "CW: " string) -                        'content-warning) -                   "\n" -                   " ---------------\n")) +         (message (concat +                   " " mastodon-tl--horiz-bar "\n " +                   (mastodon-tl--make-link +                    (concat "CW: " string) +                    'content-warning) +                   "\n " +                   mastodon-tl--horiz-bar "\n"))           (cw (mastodon-tl--set-face message 'mastodon-cw-face)))      (concat       cw diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 82a9482..65fc357 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -591,7 +591,8 @@ NO-REDRAFT means delete toot only."  (defun mastodon-toot--set-cw (&optional cw)    "Set content warning to CW if it is non-nil." -  (unless (string-empty-p cw) +  (unless (or (null cw) ; cw is nil for `mastodon-tl--dm-user' +              (string-empty-p cw))      (setq mastodon-toot--content-warning t)      (setq mastodon-toot--content-warning-from-reply-or-redraft cw))) @@ -1637,6 +1638,10 @@ EDIT means we are editing an existing toot, not composing a new one."        (mastodon-toot--display-docs-and-status-fields         (when mastodon-toot-display-orig-in-reply-buffer           reply-text)) +      ;; `reply-to-user' (alone) is also used by `mastodon-tl--dm-user', so +      ;; perhaps we should not always call --setup-as-reply, or make its +      ;; workings conditional on reply-to-id. currently it only checks for +      ;; reply-to-user.        (mastodon-toot--setup-as-reply reply-to-user reply-to-id reply-json))      (unless mastodon-toot--max-toot-chars        ;; no need to fetch from `mastodon-profile-account-settings' as diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index 22eac7e..9c016c3 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -163,10 +163,10 @@ This function is used as the update-function to  provides the JSON data."    (erase-buffer)    (insert (mastodon-tl--set-face -           (concat "\n ------------\n " +           (concat "\n " mastodon-tl--horiz-bar "\n "                     (upcase view-name) -                   "\n" -                   " ------------\n\n") +                   "\n " +                   mastodon-tl--horiz-bar "\n\n")             'success)            (if bindings-string                (mastodon-tl--set-face @@ -215,7 +215,7 @@ provides the JSON data."           (mastodon-tl--map-alist 'title lists)))      (mapc (lambda (x)              (mastodon-views--print-list-accounts x) -            (insert (propertize " ------------\n\n" +            (insert (propertize (concat " " mastodon-tl--horiz-bar "\n\n")                                  'face 'success)))            lists-names))) @@ -733,22 +733,23 @@ INSTANCE is an instance domain name."          (mastodon-views--instance-response-fun response brief instance))      (mastodon-tl--do-if-toot       (let* ((toot (if (mastodon-tl--profile-buffer-p) -                      ;; we may be on profile itself: +                      ;; we may be on profile description itself:                        (or (mastodon-tl--property 'profile-json)                            ;; or on profile account listings, which use toot-json:                            ;; or just toots:                            (mastodon-tl--property 'toot-json)) -                    ;; normal timeline: +                    ;; normal timeline/account listing:                      (mastodon-tl--property 'toot-json)))              (reblog (alist-get 'reblog toot))              (account (or (alist-get 'account reblog) -                         (alist-get 'account toot))) +                         (alist-get 'account toot) +                         toot)) ; else `toot' is already an account listing.              ;; we can't use --profile-buffer-p as our test here because we may -            ;; be looking at toots/boosts/users in a profile buffer +            ;; be looking at toots/boosts/users in a profile buffer.              ;; profile-json works as a defacto test for if point is on the              ;; profile details at the top of a profile buffer.              (url (if (mastodon-tl--property 'profile-json) -                     (alist-get 'url toot) ; profile +                     (alist-get 'url toot) ; profile description                     (alist-get 'url account)))              (username (if (mastodon-tl--property 'profile-json)                            (alist-get 'username toot) ;; profile | 
