sugarlabs / sugar-toolkit-gtk3

Sugar Learning Environment, Activity Toolkit, GTK 3.
GNU Lesser General Public License v2.1
21 stars 80 forks source link

Activity is briefly shown as invite only during join of a shared activity #373

Open quozl opened 6 years ago

quozl commented 6 years ago

Reproducer; start Chat on one instance of Sugar, share the activity, locate the shared activity on another instance of Sugar, click on it to join, and quickly as soon as the activity launches observe the share button state and click to share the activity.

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/sugar3/activity/widgets.py", line 151, in __neighborhood_clicked_cb
    activity.share()
  File "/usr/lib/python2.7/site-packages/sugar3/activity/activity.py", line 1118, in share
    pservice.share_activity(self, private=private)
  File "/usr/lib/python2.7/site-packages/sugar3/presence/presenceservice.py", line 207, in share_activity
    activity.get_id())
ValueError: Activity 0ac36b33d934a8d1fc6e0676184b543f1936c7d4 is already tracked

Most easily reproduced with StopWatch or Chat 95170aa7bc78f2f5a57c56cfab0ec974e96b404b.

Time window depends on the collaboration infrastructure. Using the default Telepahy Salut based collaboration the window is between five and nine seconds.

Instead, show the share state as neighbourhood as soon as a shared activity launches. This will disable the ShareButton and thus avoid the redundant request and traceback.