From 85061454a65ba21e37dac7be90c34104b38e20b2 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Wed, 15 Jun 2016 23:27:57 +0300 Subject: [PATCH] read receipts - spinner --- src/callbacks.py | 5 ++++- src/images/spinner.gif | Bin 0 -> 1862 bytes src/list_items.py | 11 ++++++++--- src/profile.py | 16 ++++++++-------- 4 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 src/images/spinner.gif diff --git a/src/callbacks.py b/src/callbacks.py index d0413de..a33fd35 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -148,7 +148,10 @@ def friend_typing(tox, friend_number, typing, user_data): def friend_read_receipt(tox, friend_number, message_id, user_data): - Profile.get_instance().get_friend_by_number(friend_number).dec_receipt() + profile = Profile.get_instance() + profile.get_friend_by_number(friend_number).dec_receipt() + if friend_number == profile.get_active_number(): + invoke_in_main_thread(profile.update) # TODO: improve # ----------------------------------------------------------------------------------------------------------------- # Callbacks - file transfers diff --git a/src/images/spinner.gif b/src/images/spinner.gif new file mode 100644 index 0000000000000000000000000000000000000000..33e021339fecb299afd0069b1c72ea4332d10fa7 GIT binary patch literal 1862 zcmZ?wbhEHb6k!lycy7S}1dNP~OiWD7%*-q-EUc`oY;0`o?CcyI9Gsk-TwGk-+}u1o zJiNTTe0+TT{QLp}0)m2qLPA2q!ongVBBG+AVq#+A;^Gn#5|WaVQc_aV($X?AGP1I= za&mI=^70A_3W|z~N=iz~%E~G#DypigYHDig>gpOA8k(A#T3TA#+S)ogI=Z^LdU|^L z`uYY228M=)Mn*=)#>OTlCZ?vQW@cvQ=H?a_7M7NlR#sNl*48#QHnz65c6N65_Vx}A z4vvnFPEJnF&dx3_F0QVwZf35kh`Nl8h` z$;l}xDXFQcX=!Qc>FF668JU@xSy@@x+1WWcIk~yHd3kyH`S}F}1%-u$MMXu$#leI>6_u5hRaI5h)zvjMHMO<1b#-<1_4N%64ULVBO-)VB&CM+>Ev>Ds zZEbDs?d=^M9i5$>U0q$>-Q7JsJ-xlX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