Browse Source

forgot to save

master
Julio Biason 15 years ago
parent
commit
2eeacf4030
  1. 10
      mitterlib/network/__init__.py

10
mitterlib/network/__init__.py

@ -180,6 +180,10 @@ class Networks(object):
message.network = shortcut message.network = shortcut
result.append(message) result.append(message)
self._operations += 1 self._operations += 1
# don't check the operations count inside the loop; if Mitter
# fails, all the last messages can still be retrieved ('cause the
# config file wasn't saved yet.)
self._save()
return result return result
def update(self, status, reply_to=None, network=None): def update(self, status, reply_to=None, network=None):
@ -192,6 +196,7 @@ class Networks(object):
for shortcut in self._targets(network): for shortcut in self._targets(network):
results.append(self.networks[shortcut].update(status, reply_to)) results.append(self.networks[shortcut].update(status, reply_to))
self._operations += 1 self._operations += 1
self._save()
return results return results
def reply_prefix(self, message): def reply_prefix(self, message):
@ -205,6 +210,7 @@ class Networks(object):
assert(isinstance(message, NetworkData)) assert(isinstance(message, NetworkData))
self.networks[message.network].repost(message) self.networks[message.network].repost(message)
self._operations += 1 self._operations += 1
self._save()
return return
def favourite(self, message): def favourite(self, message):
@ -212,6 +218,7 @@ class Networks(object):
assert(isinstance(message, NetworkData)) assert(isinstance(message, NetworkData))
self.networks[message.network].favourite(message) self.networks[message.network].favourite(message)
self._operations += 1 self._operations += 1
self._save()
return return
def delete_message(self, message, network=None): def delete_message(self, message, network=None):
@ -223,6 +230,7 @@ class Networks(object):
self.networks[network].delete_message(message) self.networks[network].delete_message(message)
self._operations += 1 self._operations += 1
self._save()
return return
def message(self, message_id, network): def message(self, message_id, network):
@ -235,6 +243,7 @@ class Networks(object):
data = self.networks[network].message(message_id) data = self.networks[network].message(message_id)
data.network = network data.network = network
self._operations += 1 self._operations += 1
self._save()
return data return data
def link(self, message): def link(self, message):
@ -251,6 +260,7 @@ class Networks(object):
message.network = shortcut message.network = shortcut
result.append(message) result.append(message)
self._operations += 1 self._operations += 1
self._save()
return result return result
def available_requests(self, network=None): def available_requests(self, network=None):

Loading…
Cancel
Save