diff --git a/feeluown/gui/image.py b/feeluown/gui/image.py index 8895fc7117..173a503310 100644 --- a/feeluown/gui/image.py +++ b/feeluown/gui/image.py @@ -53,8 +53,6 @@ async def get(self, img_url, img_name): self.cache.update(img_name) return content event_loop = asyncio.get_event_loop() - action_msg = 'Downloading image from {}'.format(img_url) - self._app.show_msg(action_msg) try: # May return None. res = await event_loop.run_in_executor( diff --git a/feeluown/gui/tips.py b/feeluown/gui/tips.py index 40825ffc4a..cbfbfa754d 100644 --- a/feeluown/gui/tips.py +++ b/feeluown/gui/tips.py @@ -3,6 +3,46 @@ from feeluown.utils import aio from feeluown.app import App +# (nickname, name), no order. +# Write your Chinese(or other languages) name if you want. +Contributors = [ + ('cosven', 'Shaowen Yin'), + ('felixonmars', ''), + ('PhotonQuantum', ''), + ('wuliaotc', ''), + ('cyliuu', ''), + ('light4', ''), + ('hjlarry', ''), + ('sbwtw', ''), + ('oryxfea', ''), + ('poly000', ''), + ('BruceZhang1993', ''), + ('cposture', ''), + ('helinb', ''), + ('Yexiaoxing', ''), + ('albertofwb', ''), + ('catsout', ''), + ('Torxed', ''), + ('RealXuChe', ''), + ('rapiz1', ''), + ('Heersin', ''), + ('chen-chao', ''), + ('keter42', ''), + ('timgates42', ''), + ('junhan-z', ''), + ('CareF', ''), + ('berberman', ''), + ('SaneBow', ''), + ('wsyxbcl', ''), + ('Thearas', ''), + ('reaink', ''), + ('wenLiangcan', ''), + ('leedagee', ''), + ('hanchanli', ''), + ('xssss1', ''), + ('williamherry', ''), +] + class TipsManager: """在合适的时候展示一些使用 Tip""" @@ -22,7 +62,17 @@ def __init__(self, app: App): self._app.started.connect(self.show_random_after_5s) def show_random(self): - self._app.show_msg(random.choice(self.tips), timeout=2500) + if random.randint(0, 10) < 5: + self._app.show_msg(random.choice(self.tips), timeout=2500) + else: + contributor = random.choice(Contributors) + nickname, name = contributor + if name: + user = f'{name} (@{nickname})' + else: + user = f'@{nickname}' + msg = f'感谢 {user} 的贡献 :)' + self._app.show_msg(msg, timeout=2500) def show_random_after_5s(self, *_): async def task():