From e97bad397dde9e8faa7a85eab53812106f940df7 Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Thu, 29 Jan 2009 06:28:26 +0000 Subject: Suppress wrong positions in players list OLPC#5242 Place current user at the end of players list all time. Update current-player position after HELLO procedure --- (limited to 'activity.py') diff --git a/activity.py b/activity.py index f6f3186..9b15453 100644 --- a/activity.py +++ b/activity.py @@ -234,17 +234,14 @@ class MemorizeActivity(Activity): _logger.debug('Joined an existing shared activity') - self.found = 0 for buddy in self._shared_activity.get_joined_buddies(): - _logger.debug("buddy joined - _joined_cb: %s (get buddies of activity and add them to my list)", buddy.props.nick) - self.game.add_buddy(buddy) - if buddy == self.owner: - self.found = 1 - - if self.found == 0: - _logger.debug("buddy joined - _joined_cb: Not foud myself in buddy list - will add myself at end of the list.") - self.game.add_buddy(self.owner) + if buddy != self.owner: + _logger.debug("buddy joined - _joined_cb: %s " + "(get buddies of activity and add them to my list)", + buddy.props.nick) + self.game.add_buddy(buddy) + self.game.add_buddy(self.owner) self.initiating = False self._sharing_setup() -- cgit v0.9.1