Add kivy Sent screen
This commit is contained in:
parent
60812ce892
commit
1189628ed6
|
@ -147,7 +147,7 @@ class MailDetail(Screen): # pylint: disable=too-many-instance-attributes
|
||||||
self.kivy_state.searching_text = ''
|
self.kivy_state.searching_text = ''
|
||||||
self.children[0].children[0].active = True
|
self.children[0].children[0].active = True
|
||||||
if self.kivy_state.detail_page_type == 'sent':
|
if self.kivy_state.detail_page_type == 'sent':
|
||||||
App.get_running_app().root.ids.sc4.ids.sent_search.ids.search_field.text = ''
|
App.get_running_app().root.ids.id_sent.ids.sent_search.ids.search_field.text = ''
|
||||||
delete(self.kivy_state.mail_id)
|
delete(self.kivy_state.mail_id)
|
||||||
msg_count_objs.send_cnt.ids.badge_txt.text = str(int(self.kivy_state.sent_count) - 1)
|
msg_count_objs.send_cnt.ids.badge_txt.text = str(int(self.kivy_state.sent_count) - 1)
|
||||||
self.kivy_state.sent_count = str(int(self.kivy_state.sent_count) - 1)
|
self.kivy_state.sent_count = str(int(self.kivy_state.sent_count) - 1)
|
||||||
|
|
30
src/bitmessagekivy/baseclass/sent.py
Normal file
30
src/bitmessagekivy/baseclass/sent.py
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
# pylint: disable=import-error, attribute-defined-outside-init, too-many-arguments
|
||||||
|
# pylint: disable=no-member, no-name-in-module, unused-argument, too-few-public-methods
|
||||||
|
|
||||||
|
"""
|
||||||
|
Sent screen; All sent message managed here.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from kivy.properties import StringProperty, ListProperty
|
||||||
|
from kivy.uix.screenmanager import Screen
|
||||||
|
from kivy.app import App
|
||||||
|
|
||||||
|
from pybitmessage.bitmessagekivy.baseclass.common import kivy_state_variables
|
||||||
|
|
||||||
|
|
||||||
|
class Sent(Screen):
|
||||||
|
"""Sent Screen class for kivy UI"""
|
||||||
|
|
||||||
|
queryreturn = ListProperty()
|
||||||
|
account = StringProperty()
|
||||||
|
has_refreshed = True
|
||||||
|
no_search_res_found = "No search result found"
|
||||||
|
label_str = "Yet no message for this account!"
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
"""Association with the screen"""
|
||||||
|
super(Sent, self).__init__(*args, **kwargs)
|
||||||
|
self.kivy_state = kivy_state_variables()
|
||||||
|
if self.kivy_state.selected_address == '':
|
||||||
|
if App.get_running_app().identity_list:
|
||||||
|
self.kivy_state.selected_address = App.get_running_app().identity_list[0]
|
|
@ -130,7 +130,7 @@
|
||||||
text: app.tr._('Sent')
|
text: app.tr._('Sent')
|
||||||
icon: 'send'
|
icon: 'send'
|
||||||
divider: None
|
divider: None
|
||||||
on_release: app.root.ids.scr_mngr.current = 'sent'
|
on_release: app.set_screen('sent')
|
||||||
on_release: root.parent.set_state()
|
on_release: root.parent.set_state()
|
||||||
NavigationItem:
|
NavigationItem:
|
||||||
id: draft_cnt
|
id: draft_cnt
|
||||||
|
@ -229,6 +229,8 @@ MDNavigationLayout:
|
||||||
id:id_settings
|
id:id_settings
|
||||||
Inbox:
|
Inbox:
|
||||||
id:id_inbox
|
id:id_inbox
|
||||||
|
Sent:
|
||||||
|
id:id_sent
|
||||||
|
|
||||||
MDNavigationDrawer:
|
MDNavigationDrawer:
|
||||||
id: nav_drawer
|
id: nav_drawer
|
||||||
|
|
|
@ -36,5 +36,10 @@
|
||||||
"kv_string": "settings",
|
"kv_string": "settings",
|
||||||
"name_screen": "set",
|
"name_screen": "set",
|
||||||
"Import": "from pybitmessage.bitmessagekivy.baseclass.settings import Setting"
|
"Import": "from pybitmessage.bitmessagekivy.baseclass.settings import Setting"
|
||||||
|
},
|
||||||
|
"Sent": {
|
||||||
|
"kv_string": "sent",
|
||||||
|
"name_screen": "sent",
|
||||||
|
"Import": "from pybitmessage.bitmessagekivy.baseclass.sent import Sent"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue
Block a user