[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mastodon 49261b91b0 59/63: Revert "replace persist with mu
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mastodon 49261b91b0 59/63: Revert "replace persist with multisession" |
Date: |
Sun, 4 Aug 2024 04:00:44 -0400 (EDT) |
branch: elpa/mastodon
commit 49261b91b075b9ee77c96bbd04fa05043d29d28a
Author: marty hiatt <martianhiatus@riseup.net>
Commit: marty hiatt <martianhiatus@riseup.net>
Revert "replace persist with multisession"
This reverts commit f19f3bc2735bd78bb3150b8507b6f8949108cece.
---
lisp/mastodon-profile.el | 19 ++++++++-----------
lisp/mastodon-toot.el | 4 +---
lisp/mastodon.el | 2 +-
3 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index cd1978fde1..de16b7d216 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -35,6 +35,7 @@
;;; Code:
(require 'seq)
(require 'cl-lib)
+(require 'persist)
(require 'parse-time)
(require 'mastodon-http)
(eval-when-compile
@@ -124,8 +125,8 @@ It contains details of the current user's account.")
map)
"Keymap for `mastodon-profile-update-mode'.")
-(define-multisession-variable mastodon-profile-account-settings nil
- "An alist of account settings saved from the server.
+(persist-defvar mastodon-profile-account-settings nil
+ "An alist of account settings saved from the server.
Other clients can change these settings on the server at any
time, so this list is not the canonical source for settings. It
is updated on entering mastodon mode and on toggle any setting it
@@ -364,16 +365,13 @@ SOURCE means that the preference is in the `source' part
of the account JSON."
(defun mastodon-profile--get-pref (pref)
"Return PREF from `mastodon-profile-account-settings'."
- (plist-get (multisession-value mastodon-profile-account-settings)
- pref))
+ (plist-get mastodon-profile-account-settings pref))
(defun mastodon-profile--update-preference-plist (pref val)
"Set local account preference plist preference PREF to VAL.
This is done after changing the setting on the server."
- (setf (multisession-value mastodon-profile-account-settings)
- (plist-put
- (multisession-value mastodon-profile-account-settings)
- pref val)))
+ (setq mastodon-profile-account-settings
+ (plist-put mastodon-profile-account-settings pref val)))
;; used in toot.el
(defun mastodon-profile--fetch-server-account-settings-maybe ()
@@ -386,8 +384,7 @@ Only do so if `mastodon-profile-account-settings' is nil."
Store the values in `mastodon-profile-account-settings'.
Run in `mastodon-mode-hook'.
If NO-FORCE, only fetch if `mastodon-profile-account-settings' is nil."
- (unless (and no-force
- (multisession-value mastodon-profile-account-settings))
+ (unless (and no-force mastodon-profile-account-settings)
(let ((keys '(locked discoverable display_name bot))
(source-keys '(privacy sensitive language)))
(mapc (lambda (k)
@@ -405,7 +402,7 @@ If NO-FORCE, only fetch if
`mastodon-profile-account-settings' is nil."
;; TODO: remove now redundant vars, replace with fetchers from the plist
(setq mastodon-toot--visibility (mastodon-profile--get-pref 'privacy)
mastodon-toot--content-nsfw (mastodon-profile--get-pref
'sensitive))
- (multisession-value mastodon-profile-account-settings))))
+ mastodon-profile-account-settings)))
(defun mastodon-profile--account-locked-toggle ()
"Toggle the locked status of your account.
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 12695165da..6387beae17 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1951,9 +1951,7 @@ EDIT means we are editing an existing toot, not composing
a new one."
(mastodon-toot-mode t)
;; set visibility:
(setq mastodon-toot--visibility
- (or (plist-get
- (multisession-value mastodon-profile-account-settings)
- 'privacy)
+ (or (plist-get mastodon-profile-account-settings 'privacy)
;; use toot visibility setting from the server:
(mastodon-profile--get-source-value 'privacy)
"public")) ; fallback
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index 41b6fbe450..82a2491424 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -7,7 +7,7 @@
;; Marty Hiatt <martianhiatus@riseup.net>
;; Maintainer: Marty Hiatt <martianhiatus@riseup.net>
;; Version: 1.0.24
-;; Package-Requires: ((emacs "27.1") (request "0.3.0"))
+;; Package-Requires: ((emacs "27.1") (request "0.3.0") (persist "0.4"))
;; Homepage: https://codeberg.org/martianh/mastodon.el
;; This file is not part of GNU Emacs.
- [nongnu] elpa/mastodon 41404473ea 05/63: toot.el: user-error not message when needed, (continued)
- [nongnu] elpa/mastodon 41404473ea 05/63: toot.el: user-error not message when needed, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 534644d2bd 13/63: toot: default to emoji.el, emojify customize, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 3ba86999d3 26/63: flymake toot.el, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 43cd626f6a 28/63: Merge branch 'emoji.el' into develop, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon c95a19b2d5 33/63: index update, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon bc83b400b1 40/63: fix unfolding faved/bookmarked toots, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon dad54cccbc 46/63: fold-post-toggle, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 80ce719004 38/63: flymake our user-error mess, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 35a26600af 53/63: reimplement folding via insert body only., ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 0ef13ab348 55/63: fix prev-item-id, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 49261b91b0 59/63: Revert "replace persist with multisession",
ELPA Syncer <=
- [nongnu] elpa/mastodon 351bd73875 54/63: fix prev-item-id, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 712a2af648 29/63: update info, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 0cd77c1880 37/63: Merge branch 'with-toot-item' into develop, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 82931c0869 14/63: readme, emoji, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 4e8d286164 12/63: mastodon-use-emojify customize, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 4697c073e8 19/63: message -> user-error, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 344da8f2f2 23/63: fold toots customize/ refactor, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon db227a8c25 31/63: flip an if clause, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 4844a1147a 44/63: no newline after READ MORE heading, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon dd1b0ab770 42/63: add mastodon-tl--fold-post, ELPA Syncer, 2024/08/04