store annotation on server only if it has changed
This commit is contained in:
parent
ac7bc2a229
commit
0969df7ce1
|
@ -95,9 +95,12 @@ class VcardWindow:
|
||||||
gobject.source_remove(self.update_progressbar_timeout_id)
|
gobject.source_remove(self.update_progressbar_timeout_id)
|
||||||
del gajim.interface.instances[self.account]['infos'][self.contact.jid]
|
del gajim.interface.instances[self.account]['infos'][self.contact.jid]
|
||||||
buffer = self.xml.get_widget('textview_annotation').get_buffer()
|
buffer = self.xml.get_widget('textview_annotation').get_buffer()
|
||||||
gajim.connections[self.account].annotations[self.contact.jid] = \
|
annotation = buffer.get_text(buffer.get_start_iter(),
|
||||||
buffer.get_text(buffer.get_start_iter(), buffer.get_end_iter())
|
buffer.get_end_iter())
|
||||||
gajim.connections[self.account].store_annotations()
|
connection = gajim.connections[self.account]
|
||||||
|
if annotation != connection.annotations[self.contact.jid]:
|
||||||
|
connection.annotations[self.contact.jid] = annotation
|
||||||
|
connection.store_annotations()
|
||||||
|
|
||||||
|
|
||||||
def on_vcard_information_window_key_press_event(self, widget, event):
|
def on_vcard_information_window_key_press_event(self, widget, event):
|
||||||
|
|
Loading…
Reference in New Issue