def send_mail_or_show_profile(self, user_name, instance_open_mail=None):
"""??????? ???? ? ???????? ?????? ??????? ??? ????? ??? ????????
????????? ?????????? ????????????.
type instance_open_mail: <class 'messageviewer.MessageViewer'>;
param instance_open_mail: ???????? ???? ? ??????? ????????????????
?????????;
"""
def _send_mail_or_show_profile(*args):
name_button = args[0][0] # "???????"/"?????????"
if name_button == core.string_lang_item_menu_profile:
progress = \
self.create_window(text=core.string_lang_info_your)
Clock.schedule_once(lambda *arg: self.show_user_profile(
progress, user_name, instance_open_mail), 1)
elif name_button == core.string_lang_write_message_status:
self.send_mail(user_name)
self.create_window(
callback=lambda *args: _send_mail_or_show_profile(args),
param="query", dismiss=True,
text=core.string_lang_username.format(user_name),
button_ok=core.string_lang_item_menu_profile,
button_cancel=core.string_lang_write_message_status)
评论列表
文章目录