|
From: Magnus H. <leg...@us...> - 2015-04-21 10:19:29
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "emacs-jabber".
The branch, roster-optimisation has been updated
via 74202d4c8d3bf2770a30a7fad54ff975fa28e49c (commit)
via 3d9348c255740be2e44c9206827faf58b4eda083 (commit)
from 5e5f6de6e2c8b4bd4de7d9b3a910b31b3fa6a25d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 74202d4c8d3bf2770a30a7fad54ff975fa28e49c
Author: Magnus Henoch <mag...@gm...>
Date: Mon Apr 20 20:16:27 2015 +0100
No need to special-case items being added to the roster
Currently they'll trigger a complete roster redraw by virtue of adding a
contact to a certain roster group.
diff --git a/jabber-roster.el b/jabber-roster.el
index 3a5205a..ad70017 100644
--- a/jabber-roster.el
+++ b/jabber-roster.el
@@ -740,8 +740,7 @@ three being lists of JID symbols."
(all-groups (plist-get (fsm-get-state-data jc) :roster-groups))
(buddy-ewoc-node-hash (plist-get (fsm-get-state-data jc) :buddy-ewoc-node-hash))
(group-ewoc-node-hash (plist-get (fsm-get-state-data jc) :group-ewoc-node-hash))
- ;; Currently we need to redraw the roster when items are added.
- (need-redraw (not (null new-items))))
+ (need-redraw nil))
;; fix a old-roster
(dolist (delete-this deleted-items)
commit 3d9348c255740be2e44c9206827faf58b4eda083
Author: Magnus Henoch <mag...@gm...>
Date: Fri Apr 17 20:53:41 2015 +0100
Delete roster items in QuickCheck test
This didn't reveal any errors.
diff --git a/tests/roster-display.hs b/tests/roster-display.hs
index 2be41bd..9505d75 100644
--- a/tests/roster-display.hs
+++ b/tests/roster-display.hs
@@ -9,6 +9,7 @@ import Data.Char (toLower)
import Control.Monad (liftM, mfilter)
data RosterEvent = IqRoster JID [Group] (Maybe String) |
+ IqRosterDelete JID |
Presence JID PresenceType |
Noop
deriving (Show, Eq)
@@ -18,6 +19,7 @@ instance Arbitrary RosterEvent where
[ do groups <- arbitrary
maybeName <- arbitraryName
return $ IqRoster jid (nub groups) maybeName,
+ return $ IqRosterDelete jid,
do presenceType <- arbitrary
return $ Presence jid presenceType]
where arbitraryName :: Gen (Maybe String)
@@ -79,6 +81,10 @@ toLisp (IqRoster (JID jid) groups maybeName) =
") "++
concat ["(group () \""++group++"\")" | (Group group) <- groups] ++
" )))"
+toLisp (IqRosterDelete (JID jid)) =
+ "(iq ((type . \"set\"))"++
+ " (query ((xmlns . \"jabber:iq:roster\"))" ++
+ " (item ((jid . \""++jid++"\") (subscription . \"remove\")))))"
toLisp (Presence (JID jid) Unavailable) =
"(presence ((from . \""++jid++"\") (type . \"unavailable\")))"
toLisp (Presence (JID jid) Online) =
-----------------------------------------------------------------------
Summary of changes:
jabber-roster.el | 3 +--
tests/roster-display.hs | 6 ++++++
2 files changed, 7 insertions(+), 2 deletions(-)
hooks/post-receive
--
emacs-jabber
|