Fixed sql query
This commit is contained in:
parent
df712511da
commit
2e5fcf5fc6
0
src/bitmessagekivy/baseclass/__init__.py
Normal file
0
src/bitmessagekivy/baseclass/__init__.py
Normal file
|
@ -178,9 +178,7 @@ class AddressBook(Screen, HelperAddressBook):
|
|||
if label in stored_labels and self.address == add_dict[label]:
|
||||
stored_labels.remove(label)
|
||||
if label and label not in stored_labels:
|
||||
sqlExecute(
|
||||
"UPDATE addressbook SET label = ? WHERE"
|
||||
"address = ?", label, self.addbook_popup.content_cls.address)
|
||||
sqlExecute("UPDATE addressbook SET label = ? WHERE address = ?", label, self.addbook_popup.content_cls.address)
|
||||
state.kivyapp.root.ids.sc11.ids.ml.clear_widgets()
|
||||
state.kivyapp.root.ids.sc11.loadAddresslist(None, 'All', '')
|
||||
self.addbook_popup.dismiss()
|
||||
|
|
|
@ -2,6 +2,7 @@ from datetime import datetime
|
|||
from kivy.core.window import Window
|
||||
from kivy.lang import Builder
|
||||
from kivy.metrics import dp
|
||||
from kivy.app import App
|
||||
from kivymd.uix.list import (
|
||||
ILeftBody,
|
||||
IRightBodyTouch,
|
||||
|
@ -82,13 +83,29 @@ def showLimitedCnt(total_msg):
|
|||
|
||||
def avatarImageFirstLetter(letter_string):
|
||||
"""This function is used to the first letter for the avatar image"""
|
||||
# try:
|
||||
# if isinstance(letter_string, int):
|
||||
# letter_string = str(letter_string)
|
||||
# letter_string = letter_string.title()[0]
|
||||
# if image_exists:
|
||||
# return letter
|
||||
# raise IndexError
|
||||
# except IndexError:
|
||||
# return '!'
|
||||
# import pdb; pdb.set_trace()
|
||||
|
||||
try:
|
||||
if isinstance(letter_string, int):
|
||||
return letter_string[0]
|
||||
elif isinstance(letter_string, str) and letter_string[0].isalnum():
|
||||
return letter_string.title()[0]
|
||||
else:
|
||||
return '!'
|
||||
image_letter = letter_string.title()[0]
|
||||
if image_letter.isalnum():
|
||||
return image_letter
|
||||
return '!'
|
||||
|
||||
# if isinstance(letter_string, int):
|
||||
# return letter_string[0]
|
||||
# elif isinstance(letter_string, str) and letter_string[0].isalnum():
|
||||
# return letter_string.title()[0]
|
||||
# else:
|
||||
# return '!'
|
||||
except IndexError:
|
||||
return '!'
|
||||
|
||||
|
@ -146,10 +163,13 @@ class CutsomSwipeToDeleteItem(MDCardSwipe):
|
|||
|
||||
def empty_screen_label(label_str=None, no_search_res_found=None):
|
||||
"""Returns default text on screen when no address is there."""
|
||||
kivy_running_app = App.get_running_app()
|
||||
kivy_state = kivy_running_app.kivy_state_obj
|
||||
# import pdb; pdb.set_trace()
|
||||
content = MDLabel(
|
||||
font_style='Caption',
|
||||
theme_text_color='Primary',
|
||||
text=no_search_res_found if state.searcing_text else label_str,
|
||||
text=no_search_res_found if kivy_state.searcing_text else label_str,
|
||||
halign='center',
|
||||
size_hint_y=None,
|
||||
valign='top')
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
'''
|
||||
This is for pamyent related part
|
||||
This is for payment related part
|
||||
'''
|
||||
from kivy.uix.boxlayout import BoxLayout
|
||||
from kivymd.uix.behaviors.elevation import RectangularElevationBehavior
|
||||
from kivy.uix.screenmanager import Screen
|
||||
|
||||
from kivymd.uix.behaviors.elevation import RectangularElevationBehavior
|
||||
from kivymd.uix.label import MDLabel
|
||||
from kivymd.uix.list import (
|
||||
IRightBodyTouch,
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import state
|
||||
from bitmessagekivy.baseclass.common import toast
|
||||
from kivy.uix.screenmanager import Screen
|
||||
from kivy.properties import StringProperty
|
||||
from kivy_garden.qrcode import QRCodeWidget
|
||||
|
||||
from bitmessagekivy.baseclass.common import toast
|
||||
import state
|
||||
|
||||
class ShowQRCode(Screen):
|
||||
"""ShowQRCode Screen class for kivy Ui"""
|
||||
|
|
Reference in New Issue
Block a user