99import os
1010from datetime import datetime
1111
12- from kivy .core . clipboard import Clipboard
12+ from kivy .app import App
1313from kivy .clock import Clock
14- from kivy .properties import StringProperty , NumericProperty
15- from kivy .uix .screenmanager import Screen
14+ from kivy .core .clipboard import Clipboard
1615from kivy .factory import Factory
17- from kivy .app import App
18-
16+ from kivy .properties import NumericProperty , StringProperty
17+ from kivy . uix . screenmanager import Screen
1918from kivymd .uix .button import MDFlatButton , MDIconButton
2019from kivymd .uix .dialog import MDDialog
21- from kivymd .uix .list import OneLineListItem , IRightBodyTouch
20+ from kivymd .uix .list import IRightBodyTouch , OneLineListItem
2221
2322from pybitmessage .bitmessagekivy .baseclass .common import (
24- toast , avatar_image_first_letter , show_time_history , kivy_state_variables
25- )
23+ avatar_image_first_letter , kivy_state_variables , show_time_history , toast ,
24+ DIALOG_WIDTH_ANDROID , DIALOG_WIDTH_OTHER , DIALOG_HEIGHT , LONG_PRESS_DURATION ,
25+ DELETE_DELAY )
2626from pybitmessage .bitmessagekivy .baseclass .popup import SenderDetailPopup
2727from pybitmessage .bitmessagekivy .get_platform import platform
2828from pybitmessage .helper_sql import sqlQuery
2929
30- # Define constants for magic numbers
31- ANDROID_WIDTH = 0.8
32- OTHER_WIDTH = 0.55
33- DIALOG_HEIGHT = 0.25
34- LONG_PRESS_DURATION = 1
35- DELETE_DELAY = 4
36-
3730
3831class OneLineListTitle (OneLineListItem ):
3932 """OneLineListTitle class for Kivy UI."""
@@ -58,7 +51,7 @@ def on_long_press(self, *args):
5851 def copy_message_title (self , title_text ):
5952 """Display dialog box with options to copy the message title."""
6053 self .title_text = title_text
61- width = ANDROID_WIDTH if platform == 'android' else OTHER_WIDTH
54+ width = DIALOG_WIDTH_ANDROID if platform == 'android' else DIALOG_WIDTH_OTHER
6255 self .dialog_box = MDDialog (
6356 text = title_text ,
6457 size_hint = (width , DIALOG_HEIGHT ),
0 commit comments