diff --git a/src/tests/mock/images/account_multiple.png b/src/tests/mock/images/account_multiple.png new file mode 100644 index 00000000..11271619 Binary files /dev/null and b/src/tests/mock/images/account_multiple.png differ diff --git a/src/tests/mock/images/addressbook.png b/src/tests/mock/images/addressbook.png new file mode 100644 index 00000000..69424134 Binary files /dev/null and b/src/tests/mock/images/addressbook.png differ diff --git a/src/tests/mock/images/addressbookadd.png b/src/tests/mock/images/addressbookadd.png new file mode 100644 index 00000000..82af2f63 Binary files /dev/null and b/src/tests/mock/images/addressbookadd.png differ diff --git a/src/tests/mock/images/avatar.png b/src/tests/mock/images/avatar.png new file mode 100644 index 00000000..b006bfa2 Binary files /dev/null and b/src/tests/mock/images/avatar.png differ diff --git a/src/tests/mock/images/back-button.png b/src/tests/mock/images/back-button.png new file mode 100644 index 00000000..e260b08b Binary files /dev/null and b/src/tests/mock/images/back-button.png differ diff --git a/src/tests/mock/images/bitmessage.icns b/src/tests/mock/images/bitmessage.icns new file mode 100644 index 00000000..5fe52d4e Binary files /dev/null and b/src/tests/mock/images/bitmessage.icns differ diff --git a/src/tests/mock/images/blacklist.png b/src/tests/mock/images/blacklist.png new file mode 100644 index 00000000..820065a4 Binary files /dev/null and b/src/tests/mock/images/blacklist.png differ diff --git a/src/tests/mock/images/blue-plus-icon-12.png b/src/tests/mock/images/blue-plus-icon-12.png new file mode 100644 index 00000000..f9007861 Binary files /dev/null and b/src/tests/mock/images/blue-plus-icon-12.png differ diff --git a/src/tests/mock/images/can-icon-16px.png b/src/tests/mock/images/can-icon-16px.png new file mode 100644 index 00000000..c649919f Binary files /dev/null and b/src/tests/mock/images/can-icon-16px.png differ diff --git a/src/tests/mock/images/can-icon-24px-green.png b/src/tests/mock/images/can-icon-24px-green.png new file mode 100644 index 00000000..652da9c0 Binary files /dev/null and b/src/tests/mock/images/can-icon-24px-green.png differ diff --git a/src/tests/mock/images/can-icon-24px-red.png b/src/tests/mock/images/can-icon-24px-red.png new file mode 100644 index 00000000..cf66fcbb Binary files /dev/null and b/src/tests/mock/images/can-icon-24px-red.png differ diff --git a/src/tests/mock/images/can-icon-24px-yellow.png b/src/tests/mock/images/can-icon-24px-yellow.png new file mode 100644 index 00000000..0a26470b Binary files /dev/null and b/src/tests/mock/images/can-icon-24px-yellow.png differ diff --git a/src/tests/mock/images/can-icon-24px.png b/src/tests/mock/images/can-icon-24px.png new file mode 100644 index 00000000..30f7313e Binary files /dev/null and b/src/tests/mock/images/can-icon-24px.png differ diff --git a/src/tests/mock/images/can-icon.ico b/src/tests/mock/images/can-icon.ico new file mode 100644 index 00000000..903bf3da Binary files /dev/null and b/src/tests/mock/images/can-icon.ico differ diff --git a/src/tests/mock/images/drawer_logo1.png b/src/tests/mock/images/drawer_logo1.png new file mode 100644 index 00000000..4152cc40 Binary files /dev/null and b/src/tests/mock/images/drawer_logo1.png differ diff --git a/src/tests/mock/images/greenicon.png b/src/tests/mock/images/greenicon.png new file mode 100644 index 00000000..cedf9dc2 Binary files /dev/null and b/src/tests/mock/images/greenicon.png differ diff --git a/src/tests/mock/images/identities.png b/src/tests/mock/images/identities.png new file mode 100644 index 00000000..a6aae040 Binary files /dev/null and b/src/tests/mock/images/identities.png differ diff --git a/src/tests/mock/images/images.png b/src/tests/mock/images/images.png new file mode 100644 index 00000000..7bb33861 Binary files /dev/null and b/src/tests/mock/images/images.png differ diff --git a/src/tests/mock/images/inbox.png b/src/tests/mock/images/inbox.png new file mode 100644 index 00000000..dc6a6f75 Binary files /dev/null and b/src/tests/mock/images/inbox.png differ diff --git a/src/tests/mock/images/kivy/3.zip b/src/tests/mock/images/kivy/3.zip new file mode 100644 index 00000000..34d555fe Binary files /dev/null and b/src/tests/mock/images/kivy/3.zip differ diff --git a/src/tests/mock/images/kivy/account_multiple.png b/src/tests/mock/images/kivy/account_multiple.png new file mode 100644 index 00000000..11271619 Binary files /dev/null and b/src/tests/mock/images/kivy/account_multiple.png differ diff --git a/src/tests/mock/images/kivy/addressbook.png b/src/tests/mock/images/kivy/addressbook.png new file mode 100644 index 00000000..69424134 Binary files /dev/null and b/src/tests/mock/images/kivy/addressbook.png differ diff --git a/src/tests/mock/images/kivy/addressbookadd.png b/src/tests/mock/images/kivy/addressbookadd.png new file mode 100644 index 00000000..82af2f63 Binary files /dev/null and b/src/tests/mock/images/kivy/addressbookadd.png differ diff --git a/src/tests/mock/images/kivy/avatar.png b/src/tests/mock/images/kivy/avatar.png new file mode 100644 index 00000000..b006bfa2 Binary files /dev/null and b/src/tests/mock/images/kivy/avatar.png differ diff --git a/src/tests/mock/images/kivy/back-button.png b/src/tests/mock/images/kivy/back-button.png new file mode 100644 index 00000000..e260b08b Binary files /dev/null and b/src/tests/mock/images/kivy/back-button.png differ diff --git a/src/tests/mock/images/kivy/bitmessage.icns b/src/tests/mock/images/kivy/bitmessage.icns new file mode 100644 index 00000000..5fe52d4e Binary files /dev/null and b/src/tests/mock/images/kivy/bitmessage.icns differ diff --git a/src/tests/mock/images/kivy/black_cross.png b/src/tests/mock/images/kivy/black_cross.png new file mode 100644 index 00000000..a71b611b Binary files /dev/null and b/src/tests/mock/images/kivy/black_cross.png differ diff --git a/src/tests/mock/images/kivy/blacklist.png b/src/tests/mock/images/kivy/blacklist.png new file mode 100644 index 00000000..820065a4 Binary files /dev/null and b/src/tests/mock/images/kivy/blacklist.png differ diff --git a/src/tests/mock/images/kivy/blue-plus-icon-12.png b/src/tests/mock/images/kivy/blue-plus-icon-12.png new file mode 100644 index 00000000..f9007861 Binary files /dev/null and b/src/tests/mock/images/kivy/blue-plus-icon-12.png differ diff --git a/src/tests/mock/images/kivy/can-icon-16px.png b/src/tests/mock/images/kivy/can-icon-16px.png new file mode 100644 index 00000000..c649919f Binary files /dev/null and b/src/tests/mock/images/kivy/can-icon-16px.png differ diff --git a/src/tests/mock/images/kivy/can-icon-24px-green.png b/src/tests/mock/images/kivy/can-icon-24px-green.png new file mode 100644 index 00000000..652da9c0 Binary files /dev/null and b/src/tests/mock/images/kivy/can-icon-24px-green.png differ diff --git a/src/tests/mock/images/kivy/can-icon-24px-red.png b/src/tests/mock/images/kivy/can-icon-24px-red.png new file mode 100644 index 00000000..cf66fcbb Binary files /dev/null and b/src/tests/mock/images/kivy/can-icon-24px-red.png differ diff --git a/src/tests/mock/images/kivy/can-icon-24px-yellow.png b/src/tests/mock/images/kivy/can-icon-24px-yellow.png new file mode 100644 index 00000000..0a26470b Binary files /dev/null and b/src/tests/mock/images/kivy/can-icon-24px-yellow.png differ diff --git a/src/tests/mock/images/kivy/can-icon-24px.png b/src/tests/mock/images/kivy/can-icon-24px.png new file mode 100644 index 00000000..30f7313e Binary files /dev/null and b/src/tests/mock/images/kivy/can-icon-24px.png differ diff --git a/src/tests/mock/images/kivy/can-icon.ico b/src/tests/mock/images/kivy/can-icon.ico new file mode 100644 index 00000000..903bf3da Binary files /dev/null and b/src/tests/mock/images/kivy/can-icon.ico differ diff --git a/src/tests/mock/images/kivy/copy_text.png b/src/tests/mock/images/kivy/copy_text.png new file mode 100644 index 00000000..dcc63611 Binary files /dev/null and b/src/tests/mock/images/kivy/copy_text.png differ diff --git a/src/tests/mock/images/kivy/down-arrow.png b/src/tests/mock/images/kivy/down-arrow.png new file mode 100644 index 00000000..bf3e864c Binary files /dev/null and b/src/tests/mock/images/kivy/down-arrow.png differ diff --git a/src/tests/mock/images/kivy/drawer_logo1.png b/src/tests/mock/images/kivy/drawer_logo1.png new file mode 100644 index 00000000..4152cc40 Binary files /dev/null and b/src/tests/mock/images/kivy/drawer_logo1.png differ diff --git a/src/tests/mock/images/kivy/greenicon.png b/src/tests/mock/images/kivy/greenicon.png new file mode 100644 index 00000000..cedf9dc2 Binary files /dev/null and b/src/tests/mock/images/kivy/greenicon.png differ diff --git a/src/tests/mock/images/kivy/identities.png b/src/tests/mock/images/kivy/identities.png new file mode 100644 index 00000000..a6aae040 Binary files /dev/null and b/src/tests/mock/images/kivy/identities.png differ diff --git a/src/tests/mock/images/kivy/inbox.png b/src/tests/mock/images/kivy/inbox.png new file mode 100644 index 00000000..dc6a6f75 Binary files /dev/null and b/src/tests/mock/images/kivy/inbox.png differ diff --git a/src/tests/mock/images/kivy/kivymd_logo.png b/src/tests/mock/images/kivy/kivymd_logo.png new file mode 100644 index 00000000..ce39b0d4 Binary files /dev/null and b/src/tests/mock/images/kivy/kivymd_logo.png differ diff --git a/src/tests/mock/images/kivy/left_arrow.png b/src/tests/mock/images/kivy/left_arrow.png new file mode 100644 index 00000000..0f01c425 Binary files /dev/null and b/src/tests/mock/images/kivy/left_arrow.png differ diff --git a/src/tests/mock/images/kivy/loader.gif b/src/tests/mock/images/kivy/loader.gif new file mode 100644 index 00000000..29064d57 Binary files /dev/null and b/src/tests/mock/images/kivy/loader.gif differ diff --git a/src/tests/mock/images/kivy/loader.zip b/src/tests/mock/images/kivy/loader.zip new file mode 100644 index 00000000..c80a3a17 Binary files /dev/null and b/src/tests/mock/images/kivy/loader.zip differ diff --git a/src/tests/mock/images/kivy/me.jpg b/src/tests/mock/images/kivy/me.jpg new file mode 100644 index 00000000..f54c791f Binary files /dev/null and b/src/tests/mock/images/kivy/me.jpg differ diff --git a/src/tests/mock/images/kivy/networkstatus.png b/src/tests/mock/images/kivy/networkstatus.png new file mode 100644 index 00000000..b702ee85 Binary files /dev/null and b/src/tests/mock/images/kivy/networkstatus.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/1.png b/src/tests/mock/images/kivy/ngletteravatar/1.png new file mode 100644 index 00000000..9436c7d2 Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/1.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/12.png b/src/tests/mock/images/kivy/ngletteravatar/12.png new file mode 100644 index 00000000..de894b4a Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/12.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/14.png b/src/tests/mock/images/kivy/ngletteravatar/14.png new file mode 100644 index 00000000..42b692dd Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/14.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/3.png b/src/tests/mock/images/kivy/ngletteravatar/3.png new file mode 100644 index 00000000..ad83cef2 Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/3.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/5.png b/src/tests/mock/images/kivy/ngletteravatar/5.png new file mode 100644 index 00000000..3875aace Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/5.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/56.png b/src/tests/mock/images/kivy/ngletteravatar/56.png new file mode 100644 index 00000000..33f038cf Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/56.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/65.png b/src/tests/mock/images/kivy/ngletteravatar/65.png new file mode 100644 index 00000000..fb608098 Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/65.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/8.png b/src/tests/mock/images/kivy/ngletteravatar/8.png new file mode 100644 index 00000000..dd2671e9 Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/8.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/90.png b/src/tests/mock/images/kivy/ngletteravatar/90.png new file mode 100644 index 00000000..7d1770ab Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/90.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/Galleryr_rcirclelogo_Small.jpg b/src/tests/mock/images/kivy/ngletteravatar/Galleryr_rcirclelogo_Small.jpg new file mode 100644 index 00000000..8e3b1c35 Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/Galleryr_rcirclelogo_Small.jpg differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/a.png b/src/tests/mock/images/kivy/ngletteravatar/a.png new file mode 100644 index 00000000..1c3bb8bf Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/a.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/b.png b/src/tests/mock/images/kivy/ngletteravatar/b.png new file mode 100644 index 00000000..462bf808 Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/b.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/c.png b/src/tests/mock/images/kivy/ngletteravatar/c.png new file mode 100644 index 00000000..180b7edc Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/c.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/d.png b/src/tests/mock/images/kivy/ngletteravatar/d.png new file mode 100644 index 00000000..9e983e4d Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/d.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/depositphotos_142729281-stock-illustration-letter-l-sign-design-template.jpg b/src/tests/mock/images/kivy/ngletteravatar/depositphotos_142729281-stock-illustration-letter-l-sign-design-template.jpg new file mode 100644 index 00000000..7630511f Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/depositphotos_142729281-stock-illustration-letter-l-sign-design-template.jpg differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/e.png b/src/tests/mock/images/kivy/ngletteravatar/e.png new file mode 100644 index 00000000..60961992 Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/e.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/g.png b/src/tests/mock/images/kivy/ngletteravatar/g.png new file mode 100644 index 00000000..762cc6fa Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/g.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/h.png b/src/tests/mock/images/kivy/ngletteravatar/h.png new file mode 100644 index 00000000..8f752952 Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/h.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/i.png b/src/tests/mock/images/kivy/ngletteravatar/i.png new file mode 100644 index 00000000..a89710ef Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/i.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/j.png b/src/tests/mock/images/kivy/ngletteravatar/j.png new file mode 100644 index 00000000..926de34c Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/j.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/k.png b/src/tests/mock/images/kivy/ngletteravatar/k.png new file mode 100644 index 00000000..77da163e Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/k.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/l.png b/src/tests/mock/images/kivy/ngletteravatar/l.png new file mode 100644 index 00000000..e6112f2a Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/l.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/m.png b/src/tests/mock/images/kivy/ngletteravatar/m.png new file mode 100644 index 00000000..c93554a1 Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/m.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/n.png b/src/tests/mock/images/kivy/ngletteravatar/n.png new file mode 100644 index 00000000..8158a1e4 Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/n.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/o.png b/src/tests/mock/images/kivy/ngletteravatar/o.png new file mode 100644 index 00000000..729a82a6 Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/o.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/p.png b/src/tests/mock/images/kivy/ngletteravatar/p.png new file mode 100644 index 00000000..b3adb0ce Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/p.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/r.png b/src/tests/mock/images/kivy/ngletteravatar/r.png new file mode 100644 index 00000000..1b64b8ee Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/r.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/s.png b/src/tests/mock/images/kivy/ngletteravatar/s.png new file mode 100644 index 00000000..8813d11a Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/s.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/t.jpg b/src/tests/mock/images/kivy/ngletteravatar/t.jpg new file mode 100644 index 00000000..20932aad Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/t.jpg differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/u.png b/src/tests/mock/images/kivy/ngletteravatar/u.png new file mode 100644 index 00000000..6af53add Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/u.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/v.png b/src/tests/mock/images/kivy/ngletteravatar/v.png new file mode 100644 index 00000000..aaaf191e Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/v.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/w.png b/src/tests/mock/images/kivy/ngletteravatar/w.png new file mode 100644 index 00000000..20ff7ed9 Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/w.png differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/x.jpg b/src/tests/mock/images/kivy/ngletteravatar/x.jpg new file mode 100644 index 00000000..107f1732 Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/x.jpg differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/z.png b/src/tests/mock/images/kivy/ngletteravatar/z.png new file mode 100644 index 00000000..efcda8fe Binary files /dev/null and b/src/tests/mock/images/kivy/ngletteravatar/z.png differ diff --git a/src/tests/mock/images/kivy/no_identicons.png b/src/tests/mock/images/kivy/no_identicons.png new file mode 100644 index 00000000..513f1d10 Binary files /dev/null and b/src/tests/mock/images/kivy/no_identicons.png differ diff --git a/src/tests/mock/images/kivy/payment/btc.png b/src/tests/mock/images/kivy/payment/btc.png new file mode 100644 index 00000000..33302ff8 Binary files /dev/null and b/src/tests/mock/images/kivy/payment/btc.png differ diff --git a/src/tests/mock/images/kivy/payment/buy.png b/src/tests/mock/images/kivy/payment/buy.png new file mode 100644 index 00000000..3a63af11 Binary files /dev/null and b/src/tests/mock/images/kivy/payment/buy.png differ diff --git a/src/tests/mock/images/kivy/payment/buynew.png b/src/tests/mock/images/kivy/payment/buynew.png new file mode 100644 index 00000000..852e57b5 Binary files /dev/null and b/src/tests/mock/images/kivy/payment/buynew.png differ diff --git a/src/tests/mock/images/kivy/payment/buynew1.png b/src/tests/mock/images/kivy/payment/buynew1.png new file mode 100644 index 00000000..f02090f8 Binary files /dev/null and b/src/tests/mock/images/kivy/payment/buynew1.png differ diff --git a/src/tests/mock/images/kivy/payment/credits.jpeg b/src/tests/mock/images/kivy/payment/credits.jpeg new file mode 100644 index 00000000..6b75132a Binary files /dev/null and b/src/tests/mock/images/kivy/payment/credits.jpeg differ diff --git a/src/tests/mock/images/kivy/payment/creditss.png b/src/tests/mock/images/kivy/payment/creditss.png new file mode 100644 index 00000000..b45cd997 Binary files /dev/null and b/src/tests/mock/images/kivy/payment/creditss.png differ diff --git a/src/tests/mock/images/kivy/payment/gpay.png b/src/tests/mock/images/kivy/payment/gpay.png new file mode 100644 index 00000000..62aa55cd Binary files /dev/null and b/src/tests/mock/images/kivy/payment/gpay.png differ diff --git a/src/tests/mock/images/kivy/payment/gplay.png b/src/tests/mock/images/kivy/payment/gplay.png new file mode 100644 index 00000000..69550edd Binary files /dev/null and b/src/tests/mock/images/kivy/payment/gplay.png differ diff --git a/src/tests/mock/images/kivy/payment/gplayfinal.png b/src/tests/mock/images/kivy/payment/gplayfinal.png new file mode 100644 index 00000000..16d0d538 Binary files /dev/null and b/src/tests/mock/images/kivy/payment/gplayfinal.png differ diff --git a/src/tests/mock/images/kivy/payment/gplayss.png b/src/tests/mock/images/kivy/payment/gplayss.png new file mode 100644 index 00000000..67f293fd Binary files /dev/null and b/src/tests/mock/images/kivy/payment/gplayss.png differ diff --git a/src/tests/mock/images/kivy/payment/paypal.png b/src/tests/mock/images/kivy/payment/paypal.png new file mode 100644 index 00000000..f994130d Binary files /dev/null and b/src/tests/mock/images/kivy/payment/paypal.png differ diff --git a/src/tests/mock/images/kivy/plus-4-xxl.png b/src/tests/mock/images/kivy/plus-4-xxl.png new file mode 100644 index 00000000..1f178267 Binary files /dev/null and b/src/tests/mock/images/kivy/plus-4-xxl.png differ diff --git a/src/tests/mock/images/kivy/plus.png b/src/tests/mock/images/kivy/plus.png new file mode 100644 index 00000000..4fd3478c Binary files /dev/null and b/src/tests/mock/images/kivy/plus.png differ diff --git a/src/tests/mock/images/kivy/qidenticon.png b/src/tests/mock/images/kivy/qidenticon.png new file mode 100644 index 00000000..21abec78 Binary files /dev/null and b/src/tests/mock/images/kivy/qidenticon.png differ diff --git a/src/tests/mock/images/kivy/qidenticon_two.png b/src/tests/mock/images/kivy/qidenticon_two.png new file mode 100644 index 00000000..35180659 Binary files /dev/null and b/src/tests/mock/images/kivy/qidenticon_two.png differ diff --git a/src/tests/mock/images/kivy/qidenticon_two_x.png b/src/tests/mock/images/kivy/qidenticon_two_x.png new file mode 100644 index 00000000..a4851205 Binary files /dev/null and b/src/tests/mock/images/kivy/qidenticon_two_x.png differ diff --git a/src/tests/mock/images/kivy/qidenticon_x.png b/src/tests/mock/images/kivy/qidenticon_x.png new file mode 100644 index 00000000..07e903e5 Binary files /dev/null and b/src/tests/mock/images/kivy/qidenticon_x.png differ diff --git a/src/tests/mock/images/kivy/red.png b/src/tests/mock/images/kivy/red.png new file mode 100644 index 00000000..2570e26a Binary files /dev/null and b/src/tests/mock/images/kivy/red.png differ diff --git a/src/tests/mock/images/kivy/redicon.png b/src/tests/mock/images/kivy/redicon.png new file mode 100644 index 00000000..dfc84b47 Binary files /dev/null and b/src/tests/mock/images/kivy/redicon.png differ diff --git a/src/tests/mock/images/kivy/right-arrow.png b/src/tests/mock/images/kivy/right-arrow.png new file mode 100644 index 00000000..8f136a77 Binary files /dev/null and b/src/tests/mock/images/kivy/right-arrow.png differ diff --git a/src/tests/mock/images/kivy/search.png b/src/tests/mock/images/kivy/search.png new file mode 100644 index 00000000..42a1e45a Binary files /dev/null and b/src/tests/mock/images/kivy/search.png differ diff --git a/src/tests/mock/images/kivy/search_mail.png b/src/tests/mock/images/kivy/search_mail.png new file mode 100644 index 00000000..7b38e9b4 Binary files /dev/null and b/src/tests/mock/images/kivy/search_mail.png differ diff --git a/src/tests/mock/images/kivy/send.png b/src/tests/mock/images/kivy/send.png new file mode 100644 index 00000000..6a7c8302 Binary files /dev/null and b/src/tests/mock/images/kivy/send.png differ diff --git a/src/tests/mock/images/kivy/sent.png b/src/tests/mock/images/kivy/sent.png new file mode 100644 index 00000000..01b5f0dd Binary files /dev/null and b/src/tests/mock/images/kivy/sent.png differ diff --git a/src/tests/mock/images/kivy/subscriptions.png b/src/tests/mock/images/kivy/subscriptions.png new file mode 100644 index 00000000..e4561208 Binary files /dev/null and b/src/tests/mock/images/kivy/subscriptions.png differ diff --git a/src/tests/mock/images/kivy/text_images/!.png b/src/tests/mock/images/kivy/text_images/!.png new file mode 100644 index 00000000..bac2f246 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/!.png differ diff --git a/src/tests/mock/images/kivy/text_images/0.png b/src/tests/mock/images/kivy/text_images/0.png new file mode 100644 index 00000000..2b8b63e3 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/0.png differ diff --git a/src/tests/mock/images/kivy/text_images/1.png b/src/tests/mock/images/kivy/text_images/1.png new file mode 100644 index 00000000..3918f6d3 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/1.png differ diff --git a/src/tests/mock/images/kivy/text_images/2.png b/src/tests/mock/images/kivy/text_images/2.png new file mode 100644 index 00000000..0cf202e9 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/2.png differ diff --git a/src/tests/mock/images/kivy/text_images/3.png b/src/tests/mock/images/kivy/text_images/3.png new file mode 100644 index 00000000..f9d612dd Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/3.png differ diff --git a/src/tests/mock/images/kivy/text_images/4.png b/src/tests/mock/images/kivy/text_images/4.png new file mode 100644 index 00000000..f2ab33e1 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/4.png differ diff --git a/src/tests/mock/images/kivy/text_images/5.png b/src/tests/mock/images/kivy/text_images/5.png new file mode 100644 index 00000000..09d6e56e Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/5.png differ diff --git a/src/tests/mock/images/kivy/text_images/6.png b/src/tests/mock/images/kivy/text_images/6.png new file mode 100644 index 00000000..e385a954 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/6.png differ diff --git a/src/tests/mock/images/kivy/text_images/7.png b/src/tests/mock/images/kivy/text_images/7.png new file mode 100644 index 00000000..55fc4f77 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/7.png differ diff --git a/src/tests/mock/images/kivy/text_images/8.png b/src/tests/mock/images/kivy/text_images/8.png new file mode 100644 index 00000000..2a3fa76f Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/8.png differ diff --git a/src/tests/mock/images/kivy/text_images/9.png b/src/tests/mock/images/kivy/text_images/9.png new file mode 100644 index 00000000..81ad9084 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/9.png differ diff --git a/src/tests/mock/images/kivy/text_images/A.png b/src/tests/mock/images/kivy/text_images/A.png new file mode 100644 index 00000000..64ed6110 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/A.png differ diff --git a/src/tests/mock/images/kivy/text_images/B.png b/src/tests/mock/images/kivy/text_images/B.png new file mode 100644 index 00000000..2db56c1f Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/B.png differ diff --git a/src/tests/mock/images/kivy/text_images/C.png b/src/tests/mock/images/kivy/text_images/C.png new file mode 100644 index 00000000..47a4052c Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/C.png differ diff --git a/src/tests/mock/images/kivy/text_images/D.png b/src/tests/mock/images/kivy/text_images/D.png new file mode 100644 index 00000000..2549ffc2 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/D.png differ diff --git a/src/tests/mock/images/kivy/text_images/E.png b/src/tests/mock/images/kivy/text_images/E.png new file mode 100644 index 00000000..5d631611 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/E.png differ diff --git a/src/tests/mock/images/kivy/text_images/F.png b/src/tests/mock/images/kivy/text_images/F.png new file mode 100644 index 00000000..43086f38 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/F.png differ diff --git a/src/tests/mock/images/kivy/text_images/G.png b/src/tests/mock/images/kivy/text_images/G.png new file mode 100644 index 00000000..32d1709d Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/G.png differ diff --git a/src/tests/mock/images/kivy/text_images/H.png b/src/tests/mock/images/kivy/text_images/H.png new file mode 100644 index 00000000..279bd1ce Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/H.png differ diff --git a/src/tests/mock/images/kivy/text_images/I.png b/src/tests/mock/images/kivy/text_images/I.png new file mode 100644 index 00000000..c88f048d Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/I.png differ diff --git a/src/tests/mock/images/kivy/text_images/J.png b/src/tests/mock/images/kivy/text_images/J.png new file mode 100644 index 00000000..15331171 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/J.png differ diff --git a/src/tests/mock/images/kivy/text_images/K.png b/src/tests/mock/images/kivy/text_images/K.png new file mode 100644 index 00000000..9afcadd7 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/K.png differ diff --git a/src/tests/mock/images/kivy/text_images/L.png b/src/tests/mock/images/kivy/text_images/L.png new file mode 100644 index 00000000..e841b9d9 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/L.png differ diff --git a/src/tests/mock/images/kivy/text_images/M.png b/src/tests/mock/images/kivy/text_images/M.png new file mode 100644 index 00000000..10de35e9 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/M.png differ diff --git a/src/tests/mock/images/kivy/text_images/N.png b/src/tests/mock/images/kivy/text_images/N.png new file mode 100644 index 00000000..2d235d06 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/N.png differ diff --git a/src/tests/mock/images/kivy/text_images/O.png b/src/tests/mock/images/kivy/text_images/O.png new file mode 100644 index 00000000..c0cc972a Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/O.png differ diff --git a/src/tests/mock/images/kivy/text_images/P.png b/src/tests/mock/images/kivy/text_images/P.png new file mode 100644 index 00000000..57ec5012 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/P.png differ diff --git a/src/tests/mock/images/kivy/text_images/Q.png b/src/tests/mock/images/kivy/text_images/Q.png new file mode 100644 index 00000000..27ffd18b Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/Q.png differ diff --git a/src/tests/mock/images/kivy/text_images/R.png b/src/tests/mock/images/kivy/text_images/R.png new file mode 100644 index 00000000..090646f5 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/R.png differ diff --git a/src/tests/mock/images/kivy/text_images/S.png b/src/tests/mock/images/kivy/text_images/S.png new file mode 100644 index 00000000..444419cf Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/S.png differ diff --git a/src/tests/mock/images/kivy/text_images/T.png b/src/tests/mock/images/kivy/text_images/T.png new file mode 100644 index 00000000..ace7b36b Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/T.png differ diff --git a/src/tests/mock/images/kivy/text_images/U.png b/src/tests/mock/images/kivy/text_images/U.png new file mode 100644 index 00000000..a47f326e Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/U.png differ diff --git a/src/tests/mock/images/kivy/text_images/V.png b/src/tests/mock/images/kivy/text_images/V.png new file mode 100644 index 00000000..da07d0ac Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/V.png differ diff --git a/src/tests/mock/images/kivy/text_images/W.png b/src/tests/mock/images/kivy/text_images/W.png new file mode 100644 index 00000000..a00f9d7c Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/W.png differ diff --git a/src/tests/mock/images/kivy/text_images/X.png b/src/tests/mock/images/kivy/text_images/X.png new file mode 100644 index 00000000..be919fc4 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/X.png differ diff --git a/src/tests/mock/images/kivy/text_images/Y.png b/src/tests/mock/images/kivy/text_images/Y.png new file mode 100644 index 00000000..4819bbd1 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/Y.png differ diff --git a/src/tests/mock/images/kivy/text_images/Z.png b/src/tests/mock/images/kivy/text_images/Z.png new file mode 100644 index 00000000..7d1c8e01 Binary files /dev/null and b/src/tests/mock/images/kivy/text_images/Z.png differ diff --git a/src/tests/mock/images/kivy/transparent.png b/src/tests/mock/images/kivy/transparent.png new file mode 100644 index 00000000..26529139 Binary files /dev/null and b/src/tests/mock/images/kivy/transparent.png differ diff --git a/src/tests/mock/images/kivy/white.png b/src/tests/mock/images/kivy/white.png new file mode 100644 index 00000000..0542f499 Binary files /dev/null and b/src/tests/mock/images/kivy/white.png differ diff --git a/src/tests/mock/images/kivy/yellowicon.png b/src/tests/mock/images/kivy/yellowicon.png new file mode 100644 index 00000000..95e451d5 Binary files /dev/null and b/src/tests/mock/images/kivy/yellowicon.png differ diff --git a/src/tests/mock/images/kivymd_logo.png b/src/tests/mock/images/kivymd_logo.png new file mode 100644 index 00000000..ce39b0d4 Binary files /dev/null and b/src/tests/mock/images/kivymd_logo.png differ diff --git a/src/tests/mock/images/me.jpg b/src/tests/mock/images/me.jpg new file mode 100644 index 00000000..f54c791f Binary files /dev/null and b/src/tests/mock/images/me.jpg differ diff --git a/src/tests/mock/images/networkstatus.png b/src/tests/mock/images/networkstatus.png new file mode 100644 index 00000000..b702ee85 Binary files /dev/null and b/src/tests/mock/images/networkstatus.png differ diff --git a/src/tests/mock/images/ngletteravatar/1.png b/src/tests/mock/images/ngletteravatar/1.png new file mode 100644 index 00000000..9436c7d2 Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/1.png differ diff --git a/src/tests/mock/images/ngletteravatar/12.png b/src/tests/mock/images/ngletteravatar/12.png new file mode 100644 index 00000000..de894b4a Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/12.png differ diff --git a/src/tests/mock/images/ngletteravatar/14.png b/src/tests/mock/images/ngletteravatar/14.png new file mode 100644 index 00000000..42b692dd Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/14.png differ diff --git a/src/tests/mock/images/ngletteravatar/3.png b/src/tests/mock/images/ngletteravatar/3.png new file mode 100644 index 00000000..ad83cef2 Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/3.png differ diff --git a/src/tests/mock/images/ngletteravatar/5.png b/src/tests/mock/images/ngletteravatar/5.png new file mode 100644 index 00000000..3875aace Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/5.png differ diff --git a/src/tests/mock/images/ngletteravatar/56.png b/src/tests/mock/images/ngletteravatar/56.png new file mode 100644 index 00000000..33f038cf Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/56.png differ diff --git a/src/tests/mock/images/ngletteravatar/65.png b/src/tests/mock/images/ngletteravatar/65.png new file mode 100644 index 00000000..fb608098 Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/65.png differ diff --git a/src/tests/mock/images/ngletteravatar/8.png b/src/tests/mock/images/ngletteravatar/8.png new file mode 100644 index 00000000..dd2671e9 Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/8.png differ diff --git a/src/tests/mock/images/ngletteravatar/90.png b/src/tests/mock/images/ngletteravatar/90.png new file mode 100644 index 00000000..7d1770ab Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/90.png differ diff --git a/src/tests/mock/images/ngletteravatar/Galleryr_rcirclelogo_Small.jpg b/src/tests/mock/images/ngletteravatar/Galleryr_rcirclelogo_Small.jpg new file mode 100644 index 00000000..8e3b1c35 Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/Galleryr_rcirclelogo_Small.jpg differ diff --git a/src/tests/mock/images/ngletteravatar/a.png b/src/tests/mock/images/ngletteravatar/a.png new file mode 100644 index 00000000..1c3bb8bf Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/a.png differ diff --git a/src/tests/mock/images/ngletteravatar/b.png b/src/tests/mock/images/ngletteravatar/b.png new file mode 100644 index 00000000..462bf808 Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/b.png differ diff --git a/src/tests/mock/images/ngletteravatar/c.png b/src/tests/mock/images/ngletteravatar/c.png new file mode 100644 index 00000000..180b7edc Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/c.png differ diff --git a/src/tests/mock/images/ngletteravatar/d.png b/src/tests/mock/images/ngletteravatar/d.png new file mode 100644 index 00000000..9e983e4d Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/d.png differ diff --git a/src/tests/mock/images/ngletteravatar/depositphotos_142729281-stock-illustration-letter-l-sign-design-template.jpg b/src/tests/mock/images/ngletteravatar/depositphotos_142729281-stock-illustration-letter-l-sign-design-template.jpg new file mode 100644 index 00000000..7630511f Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/depositphotos_142729281-stock-illustration-letter-l-sign-design-template.jpg differ diff --git a/src/tests/mock/images/ngletteravatar/e.png b/src/tests/mock/images/ngletteravatar/e.png new file mode 100644 index 00000000..60961992 Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/e.png differ diff --git a/src/tests/mock/images/ngletteravatar/g.png b/src/tests/mock/images/ngletteravatar/g.png new file mode 100644 index 00000000..762cc6fa Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/g.png differ diff --git a/src/tests/mock/images/ngletteravatar/h.png b/src/tests/mock/images/ngletteravatar/h.png new file mode 100644 index 00000000..8f752952 Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/h.png differ diff --git a/src/tests/mock/images/ngletteravatar/i.png b/src/tests/mock/images/ngletteravatar/i.png new file mode 100644 index 00000000..a89710ef Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/i.png differ diff --git a/src/tests/mock/images/ngletteravatar/j.png b/src/tests/mock/images/ngletteravatar/j.png new file mode 100644 index 00000000..926de34c Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/j.png differ diff --git a/src/tests/mock/images/ngletteravatar/k.png b/src/tests/mock/images/ngletteravatar/k.png new file mode 100644 index 00000000..77da163e Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/k.png differ diff --git a/src/tests/mock/images/ngletteravatar/l.png b/src/tests/mock/images/ngletteravatar/l.png new file mode 100644 index 00000000..e6112f2a Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/l.png differ diff --git a/src/tests/mock/images/ngletteravatar/m.png b/src/tests/mock/images/ngletteravatar/m.png new file mode 100644 index 00000000..c93554a1 Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/m.png differ diff --git a/src/tests/mock/images/ngletteravatar/n.png b/src/tests/mock/images/ngletteravatar/n.png new file mode 100644 index 00000000..8158a1e4 Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/n.png differ diff --git a/src/tests/mock/images/ngletteravatar/o.png b/src/tests/mock/images/ngletteravatar/o.png new file mode 100644 index 00000000..729a82a6 Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/o.png differ diff --git a/src/tests/mock/images/ngletteravatar/p.png b/src/tests/mock/images/ngletteravatar/p.png new file mode 100644 index 00000000..b3adb0ce Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/p.png differ diff --git a/src/tests/mock/images/ngletteravatar/r.png b/src/tests/mock/images/ngletteravatar/r.png new file mode 100644 index 00000000..1b64b8ee Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/r.png differ diff --git a/src/tests/mock/images/ngletteravatar/s.png b/src/tests/mock/images/ngletteravatar/s.png new file mode 100644 index 00000000..8813d11a Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/s.png differ diff --git a/src/tests/mock/images/ngletteravatar/t.jpg b/src/tests/mock/images/ngletteravatar/t.jpg new file mode 100644 index 00000000..20932aad Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/t.jpg differ diff --git a/src/tests/mock/images/ngletteravatar/u.png b/src/tests/mock/images/ngletteravatar/u.png new file mode 100644 index 00000000..6af53add Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/u.png differ diff --git a/src/tests/mock/images/ngletteravatar/v.png b/src/tests/mock/images/ngletteravatar/v.png new file mode 100644 index 00000000..aaaf191e Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/v.png differ diff --git a/src/tests/mock/images/ngletteravatar/w.png b/src/tests/mock/images/ngletteravatar/w.png new file mode 100644 index 00000000..20ff7ed9 Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/w.png differ diff --git a/src/tests/mock/images/ngletteravatar/x.jpg b/src/tests/mock/images/ngletteravatar/x.jpg new file mode 100644 index 00000000..107f1732 Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/x.jpg differ diff --git a/src/tests/mock/images/ngletteravatar/z.png b/src/tests/mock/images/ngletteravatar/z.png new file mode 100644 index 00000000..efcda8fe Binary files /dev/null and b/src/tests/mock/images/ngletteravatar/z.png differ diff --git a/src/tests/mock/images/plus-4-xxl.png b/src/tests/mock/images/plus-4-xxl.png new file mode 100644 index 00000000..1f178267 Binary files /dev/null and b/src/tests/mock/images/plus-4-xxl.png differ diff --git a/src/tests/mock/images/plus.png b/src/tests/mock/images/plus.png new file mode 100644 index 00000000..4fd3478c Binary files /dev/null and b/src/tests/mock/images/plus.png differ diff --git a/src/tests/mock/images/qidenticon.png b/src/tests/mock/images/qidenticon.png new file mode 100644 index 00000000..21abec78 Binary files /dev/null and b/src/tests/mock/images/qidenticon.png differ diff --git a/src/tests/mock/images/qidenticon_two.png b/src/tests/mock/images/qidenticon_two.png new file mode 100644 index 00000000..35180659 Binary files /dev/null and b/src/tests/mock/images/qidenticon_two.png differ diff --git a/src/tests/mock/images/qidenticon_two_x.png b/src/tests/mock/images/qidenticon_two_x.png new file mode 100644 index 00000000..a4851205 Binary files /dev/null and b/src/tests/mock/images/qidenticon_two_x.png differ diff --git a/src/tests/mock/images/qidenticon_x.png b/src/tests/mock/images/qidenticon_x.png new file mode 100644 index 00000000..07e903e5 Binary files /dev/null and b/src/tests/mock/images/qidenticon_x.png differ diff --git a/src/tests/mock/images/redicon.png b/src/tests/mock/images/redicon.png new file mode 100644 index 00000000..dfc84b47 Binary files /dev/null and b/src/tests/mock/images/redicon.png differ diff --git a/src/tests/mock/images/send.png b/src/tests/mock/images/send.png new file mode 100644 index 00000000..6a7c8302 Binary files /dev/null and b/src/tests/mock/images/send.png differ diff --git a/src/tests/mock/images/sent.png b/src/tests/mock/images/sent.png new file mode 100644 index 00000000..01b5f0dd Binary files /dev/null and b/src/tests/mock/images/sent.png differ diff --git a/src/tests/mock/images/subscriptions.png b/src/tests/mock/images/subscriptions.png new file mode 100644 index 00000000..e4561208 Binary files /dev/null and b/src/tests/mock/images/subscriptions.png differ diff --git a/src/tests/mock/images/yellowicon.png b/src/tests/mock/images/yellowicon.png new file mode 100644 index 00000000..95e451d5 Binary files /dev/null and b/src/tests/mock/images/yellowicon.png differ diff --git a/src/tests/mock/pybitmessage/baseclass/inbox.py b/src/tests/mock/pybitmessage/baseclass/inbox.py index 09563eb7..663e45d1 100644 --- a/src/tests/mock/pybitmessage/baseclass/inbox.py +++ b/src/tests/mock/pybitmessage/baseclass/inbox.py @@ -34,18 +34,22 @@ class Inbox(Screen): def __init__(self, *args, **kwargs): """Method Parsing the address""" + # import pdb; pdb.set_trace() super(Inbox, self).__init__(*args, **kwargs) Clock.schedule_once(self.init_ui, 0) @staticmethod def set_defaultAddress(): """This method set's default address""" + # import pdb; pdb.set_trace() + if state.association == "": if state.kivyapp.variable_1: state.association = state.kivyapp.variable_1[0] def init_ui(self, dt=0): """Clock schdule for method inbox accounts""" + # import pdb; pdb.set_trace() self.loadMessagelist() def loadMessagelist(self, where="", what=""): diff --git a/src/tests/mock/pybitmessage/baseclass/login.py b/src/tests/mock/pybitmessage/baseclass/login.py index df9404c4..8f1619be 100644 --- a/src/tests/mock/pybitmessage/baseclass/login.py +++ b/src/tests/mock/pybitmessage/baseclass/login.py @@ -1,13 +1,13 @@ -import queues +from pybitmessage import queues -from bmconfigparser import BMConfigParser +from pybitmessage.bmconfigparser import BMConfigParser from kivy.clock import Clock from kivy.properties import StringProperty, BooleanProperty from kivy.uix.boxlayout import BoxLayout from kivymd.uix.behaviors.elevation import RectangularElevationBehavior from kivy.uix.screenmanager import Screen -import state +from pybitmessage import state from pybitmessage.baseclass.common import toast diff --git a/src/tests/mock/pybitmessage/baseclass/maildetail.py b/src/tests/mock/pybitmessage/baseclass/maildetail.py index 30c30343..b2ec0750 100644 --- a/src/tests/mock/pybitmessage/baseclass/maildetail.py +++ b/src/tests/mock/pybitmessage/baseclass/maildetail.py @@ -22,10 +22,10 @@ from kivy.uix.screenmanager import Screen from pybitmessage import state -from common import ( +from .common import ( toast, avatarImageFirstLetter, ShowTimeHistoy ) -from popup import SenderDetailPopup +from .popup import SenderDetailPopup class OneLineListTitle(OneLineListItem): diff --git a/src/tests/mock/pybitmessage/baseclass/msg_composer.py b/src/tests/mock/pybitmessage/baseclass/msg_composer.py index 52f58945..a9cdd343 100644 --- a/src/tests/mock/pybitmessage/baseclass/msg_composer.py +++ b/src/tests/mock/pybitmessage/baseclass/msg_composer.py @@ -1,8 +1,8 @@ import time from pybitmessage.get_platform import platform -from bmconfigparser import BMConfigParser -from helper_sql import sqlExecute, sqlQuery +from pybitmessage.bmconfigparser import BMConfigParser +from pybitmessage.helper_sql import sqlExecute, sqlQuery from kivy.clock import Clock from kivy.core.window import Window from kivy.factory import Factory @@ -26,10 +26,10 @@ from kivy.uix.textinput import TextInput from kivymd.uix.behaviors.hover_behavior import HoverBehavior from kivymd.uix.boxlayout import MDBoxLayout from kivymd.theming import ThemableBehavior -import state -import queues +from pybitmessage import state +from pybitmessage import queues -from addresses import decodeAddress, addBMIfNotPresent +from pybitmessage.addresses import decodeAddress, addBMIfNotPresent from pybitmessage.baseclass.common import ( toast, showLimitedCnt ) diff --git a/src/tests/mock/pybitmessage/baseclass/qrcode.py b/src/tests/mock/pybitmessage/baseclass/qrcode.py index 2cb3bf2d..46867990 100644 --- a/src/tests/mock/pybitmessage/baseclass/qrcode.py +++ b/src/tests/mock/pybitmessage/baseclass/qrcode.py @@ -1,4 +1,4 @@ -import state +from pybitmessage import state from pybitmessage.baseclass.common import toast from kivy.uix.screenmanager import Screen from kivy.properties import StringProperty diff --git a/src/tests/mock/pybitmessage/baseclass/scan_screen.py b/src/tests/mock/pybitmessage/baseclass/scan_screen.py index 142ae73f..664f4557 100644 --- a/src/tests/mock/pybitmessage/baseclass/scan_screen.py +++ b/src/tests/mock/pybitmessage/baseclass/scan_screen.py @@ -45,11 +45,13 @@ class ScanScreen(Screen): def __init__(self, *args, **kwargs): """Getting AddressBook Details""" + import pdb;pdb.set_trace() super(ScanScreen, self).__init__(*args, **kwargs) self.check_camera() def check_camera(self): """This method is used for checking camera avaibility""" + import pdb;pdb.set_trace() if platform != "android": import cv2 cap = cv2.VideoCapture(0) diff --git a/src/tests/mock/pybitmessage/kv/common_widgets.kv b/src/tests/mock/pybitmessage/kv/common_widgets.kv index 792fef1e..f864256d 100644 --- a/src/tests/mock/pybitmessage/kv/common_widgets.kv +++ b/src/tests/mock/pybitmessage/kv/common_widgets.kv @@ -59,4 +59,4 @@ rgba: 0,0,0,0 Rectangle: #woohoo!!! size: self.size - pos: self.pos \ No newline at end of file + pos: self.pos diff --git a/src/tests/mock/pybitmessage/main.kv b/src/tests/mock/pybitmessage/main.kv index 1b2a337b..ac432387 100644 --- a/src/tests/mock/pybitmessage/main.kv +++ b/src/tests/mock/pybitmessage/main.kv @@ -244,50 +244,50 @@ MDNavigationLayout: height: root.height - toolbar.height Inbox: id:sc1 - # Page: - # id:sc2 - Create: - id:sc3 - Sent: - id:sc4 - Trash: - id:sc5 - Login: - id:sc6 - Random: - id:sc7 - # Spam: - # id:sc8 - Setting: - id:sc9 - MyAddress: - id:sc10 - AddressBook: - id:sc11 - Payment: - id:sc12 - NetworkStat: - id:sc13 - MailDetail: - id:sc14 - ShowQRCode: - id:sc15 - Draft: - id:sc16 - Allmails: - id:sc17 - # Credits: - # id:sc18 - # Starred: - # id:sc19 - # Archieve: - # id:sc20 - # ChatRoom: - # id:sc21 - # ChatList: - # id:sc22 - ScanScreen: - id:sc23 +# # Page: +# # id:sc2 +# Create: +# id:sc3 +# Sent: +# id:sc4 +# Trash: +# id:sc5 +# Login: +# id:sc6 +# Random: +# id:sc7 +# # Spam: +# # id:sc8 +# Setting: +# id:sc9 +# MyAddress: +# id:sc10 +# AddressBook: +# id:sc11 +# Payment: +# id:sc12 +# NetworkStat: +# id:sc13 +# MailDetail: +# id:sc14 +# ShowQRCode: +# id:sc15 +# Draft: +# id:sc16 +# Allmails: +# id:sc17 +# # Credits: +# # id:sc18 +# # Starred: +# # id:sc19 +# # Archieve: +# # id:sc20 +# # ChatRoom: +# # id:sc21 +# # ChatList: +# # id:sc22 +# ScanScreen: +# id:sc23 MDNavigationDrawer: id: nav_drawer diff --git a/src/tests/mock/pybitmessage/mpybit.py b/src/tests/mock/pybitmessage/mpybit.py index 196b19a2..74856bbd 100644 --- a/src/tests/mock/pybitmessage/mpybit.py +++ b/src/tests/mock/pybitmessage/mpybit.py @@ -9,10 +9,9 @@ Bitmessage android(mobile) interface """ -# from pybitmessage.get_platform import platform -platform = 'linux' +from pybitmessage.get_platform import platform import os -# from pybitmessage import identiconGeneration +from pybitmessage import identiconGeneration from pybitmessage import kivy_helper_search from pybitmessage.uikivysignaler import UIkivySignaler from pybitmessage.bmconfigparser import BMConfigParser @@ -62,32 +61,32 @@ from pybitmessage.baseclass.common import toast # from qr_scanner.zbarcam import ZBarCam # from pyzbar.pyzbar import ZBarSymbol -# if platform != "android": -# from kivy.config import Config -# Config.set("input", "mouse", "mouse, multitouch_on_demand") -# elif platform == "android": -# from jnius import autoclass, cast -# from android.runnable import run_on_ui_thread -# from android import python_act as PythonActivity +if platform != "android": + from kivy.config import Config + Config.set("input", "mouse", "mouse, multitouch_on_demand") +elif platform == "android": + from jnius import autoclass, cast + from android.runnable import run_on_ui_thread + from android import python_act as PythonActivity -# Toast = autoclass("android.widget.Toast") -# String = autoclass("java.lang.String") -# CharSequence = autoclass("java.lang.CharSequence") -# context = PythonActivity.mActivity + Toast = autoclass("android.widget.Toast") + String = autoclass("java.lang.String") + CharSequence = autoclass("java.lang.CharSequence") + context = PythonActivity.mActivity -# @run_on_ui_thread -# def show_toast(text, length): -# """Its showing toast on screen""" -# t = Toast.makeText(context, text, length) -# t.show() + @run_on_ui_thread + def show_toast(text, length): + """Its showing toast on screen""" + t = Toast.makeText(context, text, length) + t.show() with open(os.path.join(os.path.dirname(__file__), "screens_data.json")) as read_file: all_data = ast.literal_eval(read_file.read()) data_screens = list(all_data.keys()) -# for modules in data_screens: -# exec(all_data[modules]['Import']) +for modules in data_screens: + exec(all_data[modules]['Import']) # pylint: disable=too-few-public-methods,too-many-arguments,attribute-defined-outside-init @@ -218,7 +217,7 @@ class NavigateApp(MDApp): nav_drawer = ObjectProperty() state.screen_density = Window.size window_size = state.screen_density - app_platform = 'linux' + app_platform = platform title = "PyBitmessage" imgstatus = False count = 0 @@ -239,35 +238,27 @@ class NavigateApp(MDApp): '{0}.kv'.format(all_data[kv]["kv_string"]), ) ) - print('{0}.kv'.format(all_data[kv]["kv_string"])) - import pdb; pdb.set_trace() - self.obj_1 = AddressBook() + # self.obj_1 = AddressBook() kivysignalthread = UIkivySignaler() kivysignalthread.daemon = True kivysignalthread.start() Window.bind(on_keyboard=self.on_key, on_request_close=self.on_request_close) - # return Builder.load_file( - # os.path.join(os.path.dirname(__file__), 'main.kv')) - return Builder.load_file('/home/cis/Bitmessagepeter/KivyPoject/PyBitmessage/src/tests/mock/pybitmessage/main.kv') - + return Builder.load_file( + os.path.join(os.path.dirname(__file__), 'main.kv')) def run(self): """Running the widgets""" - print('run 251 ---------------------------------') kivyuisignaler.release() super(NavigateApp, self).run() @staticmethod def showmeaddresses(name="text"): - print('showmeaddresses 257 ---------------------------------') """Show the addresses in spinner to make as dropdown""" if name == "text": - print('if') if BMConfigParser().addresses(): return BMConfigParser().addresses()[0][:16] + '..' return "textdemo" elif name == "values": - print('else') if BMConfigParser().addresses(): return [address[:16] + '..' for address in BMConfigParser().addresses()] @@ -275,28 +266,26 @@ class NavigateApp(MDApp): def getCurrentAccountData(self, text): """Get Current Address Account Data""" - # print('getCurrentAccountData 273 ---------------------------------') - # if text != '': - # if os.path.exists(state.imageDir + '/default_identicon/{}.png'.format(text)): - # self.load_selected_Image(text) - # else: - # self.set_identicon(text) - # self.root.ids.content_drawer.ids.reset_image.opacity = 0 - # self.root.ids.content_drawer.ids.reset_image.disabled = True - # address_label = self.current_address_label( - # BMConfigParser().get(text, 'label'), text) + if text != '': + if os.path.exists(state.imageDir + '/default_identicon/{}.png'.format(text)): + self.load_selected_Image(text) + else: + self.set_identicon(text) + self.root.ids.content_drawer.ids.reset_image.opacity = 0 + self.root.ids.content_drawer.ids.reset_image.disabled = True + address_label = self.current_address_label( + BMConfigParser().get(text, 'label'), text) - # self.root_window.children[1].ids.toolbar.title = address_label - # state.association = text - # state.searcing_text = '' - # LoadingPopup().open() - # self.set_message_count() - # for nav_obj in self.root.ids.content_drawer.children[ - # 0].children[0].children[0].children: - # nav_obj.active = True if nav_obj.text == 'Inbox' else False - # self.fileManagerSetting() - # Clock.schedule_once(self.setCurrentAccountData, 0.5) - pass + self.root_window.children[1].ids.toolbar.title = address_label + state.association = text + state.searcing_text = '' + LoadingPopup().open() + self.set_message_count() + for nav_obj in self.root.ids.content_drawer.children[ + 0].children[0].children[0].children: + nav_obj.active = True if nav_obj.text == 'Inbox' else False + self.fileManagerSetting() + Clock.schedule_once(self.setCurrentAccountData, 0.5) def fileManagerSetting(self): """This method is for file manager setting""" @@ -307,33 +296,29 @@ class NavigateApp(MDApp): def setCurrentAccountData(self, dt=0): """This method set the current accout data on all the screens""" - print('setCurrentAccountData 304 ---------------------------------') - - # self.root.ids.sc1.ids.ml.clear_widgets() - # self.root.ids.sc1.loadMessagelist(state.association) + self.root.ids.sc1.ids.ml.clear_widgets() + self.root.ids.sc1.loadMessagelist(state.association) - # self.root.ids.sc4.ids.ml.clear_widgets() - # self.root.ids.sc4.children[2].children[2].ids.search_field.text = '' - # self.root.ids.sc4.loadSent(state.association) + self.root.ids.sc4.ids.ml.clear_widgets() + self.root.ids.sc4.children[2].children[2].ids.search_field.text = '' + self.root.ids.sc4.loadSent(state.association) - # self.root.ids.sc16.clear_widgets() - # self.root.ids.sc16.add_widget(Draft()) + self.root.ids.sc16.clear_widgets() + self.root.ids.sc16.add_widget(Draft()) - # self.root.ids.sc5.clear_widgets() - # self.root.ids.sc5.add_widget(Trash()) + self.root.ids.sc5.clear_widgets() + self.root.ids.sc5.add_widget(Trash()) - # self.root.ids.sc17.clear_widgets() - # self.root.ids.sc17.add_widget(Allmails()) + self.root.ids.sc17.clear_widgets() + self.root.ids.sc17.add_widget(Allmails()) - # self.root.ids.sc10.ids.ml.clear_widgets() - # self.root.ids.sc10.init_ui() + self.root.ids.sc10.ids.ml.clear_widgets() + self.root.ids.sc10.init_ui() self.root.ids.scr_mngr.current = 'inbox' - pass @staticmethod def getCurrentAccount(): - print('getCurrentAccount 329 ----------------------------') """It uses to get current account label""" if state.association: return state.association @@ -382,47 +367,45 @@ class NavigateApp(MDApp): toast(altet_txt) def is_camara_attached(self): - print('is_camara_attached -----------------------378') """This method is for checking is camera available or not""" self.root.ids.sc23.check_camera() is_available = self.root.ids.sc23.camera_avaialbe return is_available def savecontact(self, instance): - # """Method is used for saving contacts""" - # pupup_obj = self.add_popup.content_cls - # label = pupup_obj.ids.label.text.strip() - # address = pupup_obj.ids.address.text.strip() - # if label == '' and address == '': - # pupup_obj.ids.label.focus = True - # pupup_obj.ids.address.focus = True - # elif address == '': - # pupup_obj.ids.address.focus = True - # elif label == '': - # pupup_obj.ids.label.focus = True - # else: - # pupup_obj.ids.address.focus = True - # # pupup_obj.ids.label.focus = True + """Method is used for saving contacts""" + pupup_obj = self.add_popup.content_cls + label = pupup_obj.ids.label.text.strip() + address = pupup_obj.ids.address.text.strip() + if label == '' and address == '': + pupup_obj.ids.label.focus = True + pupup_obj.ids.address.focus = True + elif address == '': + pupup_obj.ids.address.focus = True + elif label == '': + pupup_obj.ids.label.focus = True + else: + pupup_obj.ids.address.focus = True + # pupup_obj.ids.label.focus = True - # stored_address = [addr[1] for addr in kivy_helper_search.search_sql( - # folder="addressbook")] - # stored_labels = [labels[0] for labels in kivy_helper_search.search_sql( - # folder="addressbook")] - # if label and address and address not in stored_address \ - # and label not in stored_labels and pupup_obj.valid: - # # state.navinstance = self.parent.children[1] - # queues.UISignalQueue.put(('rerenderAddressBook', '')) - # self.add_popup.dismiss() - # sqlExecute("INSERT INTO addressbook VALUES(?,?)", label, address) - # try: - # rootIds = self.root.ids - # except Exception as e: - # rootIds = state.kivyapp.root.ids - # rootIds.sc11.ids.ml.clear_widgets() - # rootIds.sc11.loadAddresslist(None, 'All', '') - # rootIds.scr_mngr.current = 'addressbook' - # toast('Saved') - pass + stored_address = [addr[1] for addr in kivy_helper_search.search_sql( + folder="addressbook")] + stored_labels = [labels[0] for labels in kivy_helper_search.search_sql( + folder="addressbook")] + if label and address and address not in stored_address \ + and label not in stored_labels and pupup_obj.valid: + # state.navinstance = self.parent.children[1] + queues.UISignalQueue.put(('rerenderAddressBook', '')) + self.add_popup.dismiss() + sqlExecute("INSERT INTO addressbook VALUES(?,?)", label, address) + try: + rootIds = self.root.ids + except Exception as e: + rootIds = state.kivyapp.root.ids + rootIds.sc11.ids.ml.clear_widgets() + rootIds.sc11.loadAddresslist(None, 'All', '') + rootIds.scr_mngr.current = 'addressbook' + toast('Saved') def close_pop(self, instance): """Pop is Canceled""" @@ -431,7 +414,6 @@ class NavigateApp(MDApp): def getDefaultAccData(self, instance): """Getting Default Account Data""" - print('getDefaultAccData---------------------------------') if self.variable_1: state.association = first_addr = self.variable_1[0] # if BMConfigParser().get(str(first_addr), 'enabled') == 'true': @@ -459,231 +441,225 @@ class NavigateApp(MDApp): def get_default_logo(self, instance): """Getting default logo image""" - # if self.variable_1: - # first_addr = self.variable_1[0] - # if BMConfigParser().get(str(first_addr), 'enabled') == 'true': - # if os.path.exists( - # state.imageDir + '/default_identicon/{}.png'.format(first_addr)): - # return state.imageDir + '/default_identicon/{}.png'.format( - # first_addr) - # else: - # img = identiconGeneration.generate(first_addr) - # instance.texture = img.texture - # return - # return state.imageDir + '/drawer_logo1.png' - pass + if self.variable_1: + first_addr = self.variable_1[0] + if BMConfigParser().get(str(first_addr), 'enabled') == 'true': + if os.path.exists( + state.imageDir + '/default_identicon/{}.png'.format(first_addr)): + return state.imageDir + '/default_identicon/{}.png'.format( + first_addr) + else: + img = identiconGeneration.generate(first_addr) + instance.texture = img.texture + return + return state.imageDir + '/drawer_logo1.png' + @staticmethod def addressexist(): - print('addressexist 469 --------------------------') """Checking address existence""" if BMConfigParser().addresses(): return True return False def on_key(self, window, key, *args): - pass - # # pylint: disable=inconsistent-return-statements, too-many-branches - # """Method is used for going on previous screen""" - # if key == 27: - # if state.in_search_mode and self.root.ids.scr_mngr.current not in [ - # "mailDetail", "create"]: - # self.closeSearchScreen() - # elif self.root.ids.scr_mngr.current == "mailDetail": - # self.root.ids.scr_mngr.current = 'sent'\ - # if state.detailPageType == 'sent' else 'inbox' \ - # if state.detailPageType == 'inbox' else 'draft' - # self.back_press() - # if state.in_search_mode and state.searcing_text: - # toolbar_obj = self.root.ids.toolbar - # toolbar_obj.left_action_items = [ - # ['arrow-left', lambda x: self.closeSearchScreen()]] - # toolbar_obj.right_action_items = [] - # self.root.ids.toolbar.title = '' - # elif self.root.ids.scr_mngr.current == "create": - # self.save_draft() - # self.set_common_header() - # state.in_composer = False - # self.root.ids.scr_mngr.current = 'inbox' - # elif self.root.ids.scr_mngr.current == "showqrcode": - # self.set_common_header() - # self.root.ids.scr_mngr.current = 'myaddress' - # elif self.root.ids.scr_mngr.current == "random": - # self.root.ids.scr_mngr.current = 'login' - # elif self.root.ids.scr_mngr.current == 'pay-options': - # self.set_common_header() - # self.root.ids.scr_mngr.current = 'payment' - # elif self.root.ids.scr_mngr.current == 'chroom': - # if state.association: - # address_label = self.current_address_label( - # BMConfigParser().get( - # state.association, 'label'), state.association) - # self.root.ids.toolbar.title = address_label - # self.set_common_header() - # self.root.ids.scr_mngr.transition = FallOutTransition() - # self.root.ids.scr_mngr.current = 'chlist' - # self.root.ids.scr_mngr.transition = SlideTransition() - # else: - # if state.kivyapp.variable_1: - # self.root.ids.scr_mngr.current = 'inbox' - # self.root.ids.scr_mngr.transition.direction = 'right' - # self.root.ids.scr_mngr.transition.bind(on_complete=self.reset) - # return True - # elif key == 13 and state.searcing_text and not state.in_composer: - # if state.search_screen == 'inbox': - # self.root.ids.sc1.children[1].active = True - # Clock.schedule_once(self.search_callback, 0.5) - # elif state.search_screen == 'addressbook': - # self.root.ids.sc11.children[1].active = True - # Clock.schedule_once(self.search_callback, 0.5) - # elif state.search_screen == 'myaddress': - # self.loadMyAddressScreen(True) - # Clock.schedule_once(self.search_callback, 0.5) - # elif state.search_screen == 'sent': - # self.root.ids.sc4.children[1].active = True - # Clock.schedule_once(self.search_callback, 0.5) + # pylint: disable=inconsistent-return-statements, too-many-branches + """Method is used for going on previous screen""" + if key == 27: + if state.in_search_mode and self.root.ids.scr_mngr.current not in [ + "mailDetail", "create"]: + self.closeSearchScreen() + elif self.root.ids.scr_mngr.current == "mailDetail": + self.root.ids.scr_mngr.current = 'sent'\ + if state.detailPageType == 'sent' else 'inbox' \ + if state.detailPageType == 'inbox' else 'draft' + self.back_press() + if state.in_search_mode and state.searcing_text: + toolbar_obj = self.root.ids.toolbar + toolbar_obj.left_action_items = [ + ['arrow-left', lambda x: self.closeSearchScreen()]] + toolbar_obj.right_action_items = [] + self.root.ids.toolbar.title = '' + elif self.root.ids.scr_mngr.current == "create": + self.save_draft() + self.set_common_header() + state.in_composer = False + self.root.ids.scr_mngr.current = 'inbox' + elif self.root.ids.scr_mngr.current == "showqrcode": + self.set_common_header() + self.root.ids.scr_mngr.current = 'myaddress' + elif self.root.ids.scr_mngr.current == "random": + self.root.ids.scr_mngr.current = 'login' + elif self.root.ids.scr_mngr.current == 'pay-options': + self.set_common_header() + self.root.ids.scr_mngr.current = 'payment' + elif self.root.ids.scr_mngr.current == 'chroom': + if state.association: + address_label = self.current_address_label( + BMConfigParser().get( + state.association, 'label'), state.association) + self.root.ids.toolbar.title = address_label + self.set_common_header() + self.root.ids.scr_mngr.transition = FallOutTransition() + self.root.ids.scr_mngr.current = 'chlist' + self.root.ids.scr_mngr.transition = SlideTransition() + else: + if state.kivyapp.variable_1: + self.root.ids.scr_mngr.current = 'inbox' + self.root.ids.scr_mngr.transition.direction = 'right' + self.root.ids.scr_mngr.transition.bind(on_complete=self.reset) + return True + elif key == 13 and state.searcing_text and not state.in_composer: + if state.search_screen == 'inbox': + self.root.ids.sc1.children[1].active = True + Clock.schedule_once(self.search_callback, 0.5) + elif state.search_screen == 'addressbook': + self.root.ids.sc11.children[1].active = True + Clock.schedule_once(self.search_callback, 0.5) + elif state.search_screen == 'myaddress': + self.loadMyAddressScreen(True) + Clock.schedule_once(self.search_callback, 0.5) + elif state.search_screen == 'sent': + self.root.ids.sc4.children[1].active = True + Clock.schedule_once(self.search_callback, 0.5) def search_callback(self, dt=0): """Show data after loader is loaded""" - # if state.search_screen == 'inbox': - # self.root.ids.sc1.ids.ml.clear_widgets() - # self.root.ids.sc1.loadMessagelist(state.association) - # self.root.ids.sc1.children[1].active = False - # elif state.search_screen == 'addressbook': - # self.root.ids.sc11.ids.ml.clear_widgets() - # self.root.ids.sc11.loadAddresslist(None, 'All', '') - # self.root.ids.sc11.children[1].active = False - # elif state.search_screen == 'myaddress': - # self.root.ids.sc10.ids.ml.clear_widgets() - # self.root.ids.sc10.init_ui() - # self.loadMyAddressScreen(False) - # else: - # self.root.ids.sc4.ids.ml.clear_widgets() - # self.root.ids.sc4.loadSent(state.association) - # self.root.ids.sc4.children[1].active = False - # self.root.ids.scr_mngr.current = state.search_screen - pass + if state.search_screen == 'inbox': + self.root.ids.sc1.ids.ml.clear_widgets() + self.root.ids.sc1.loadMessagelist(state.association) + self.root.ids.sc1.children[1].active = False + elif state.search_screen == 'addressbook': + self.root.ids.sc11.ids.ml.clear_widgets() + self.root.ids.sc11.loadAddresslist(None, 'All', '') + self.root.ids.sc11.children[1].active = False + elif state.search_screen == 'myaddress': + self.root.ids.sc10.ids.ml.clear_widgets() + self.root.ids.sc10.init_ui() + self.loadMyAddressScreen(False) + else: + self.root.ids.sc4.ids.ml.clear_widgets() + self.root.ids.sc4.loadSent(state.association) + self.root.ids.sc4.children[1].active = False + self.root.ids.scr_mngr.current = state.search_screen def loadMyAddressScreen(self, action): - # """loadMyAddressScreen method spin the loader""" - # if len(self.root.ids.sc10.children) <= 2: - # self.root.ids.sc10.children[0].active = action - # else: - # self.root.ids.sc10.children[1].active = action - pass + """loadMyAddressScreen method spin the loader""" + if len(self.root.ids.sc10.children) <= 2: + self.root.ids.sc10.children[0].active = action + else: + self.root.ids.sc10.children[1].active = action + def save_draft(self): - # """Saving drafts messages""" - # composer_objs = self.root - # from_addr = str(self.root.ids.sc3.children[1].ids.ti.text) - # # to_addr = str(self.root.ids.sc3.children[1].ids.txt_input.text) - # if from_addr and state.detailPageType != 'draft' \ - # and not state.in_sent_method: - # Draft().draft_msg(composer_objs) - # return - pass + """Saving drafts messages""" + composer_objs = self.root + from_addr = str(self.root.ids.sc3.children[1].ids.ti.text) + # to_addr = str(self.root.ids.sc3.children[1].ids.txt_input.text) + if from_addr and state.detailPageType != 'draft' \ + and not state.in_sent_method: + Draft().draft_msg(composer_objs) + return def reset(self, *args): - # """Set transition direction""" - # self.root.ids.scr_mngr.transition.direction = 'left' - # self.root.ids.scr_mngr.transition.unbind(on_complete=self.reset) - pass + """Set transition direction""" + self.root.ids.scr_mngr.transition.direction = 'left' + self.root.ids.scr_mngr.transition.unbind(on_complete=self.reset) + @staticmethod def status_dispatching(data): - # """Dispatching Status acknowledgment""" - # ackData, message = data - # if state.ackdata == ackData: - # state.status.status = message - pass + """Dispatching Status acknowledgment""" + ackData, message = data + if state.ackdata == ackData: + state.status.status = message def clear_composer(self): - # """If slow down, the new composer edit screen""" - # self.set_navbar_for_composer() - # composer_obj = self.root.ids.sc3.children[1].ids - # composer_obj.ti.text = '' - # composer_obj.btn.text = 'Select' - # composer_obj.txt_input.text = '' - # composer_obj.subject.text = '' - # composer_obj.body.text = '' - # state.in_composer = True - # state.in_sent_method = False - pass + """If slow down, the new composer edit screen""" + self.set_navbar_for_composer() + composer_obj = self.root.ids.sc3.children[1].ids + composer_obj.ti.text = '' + composer_obj.btn.text = 'Select' + composer_obj.txt_input.text = '' + composer_obj.subject.text = '' + composer_obj.body.text = '' + state.in_composer = True + state.in_sent_method = False def set_navbar_for_composer(self): - # """Clearing toolbar data when composer open""" - # self.root.ids.toolbar.left_action_items = [ - # ['arrow-left', lambda x: self.back_press()]] - # self.root.ids.toolbar.right_action_items = [ - # ['refresh', - # lambda x: self.root.ids.sc3.children[1].reset_composer()], - # ['send', - # lambda x: self.root.ids.sc3.children[1].send(self)]] - pass + """Clearing toolbar data when composer open""" + self.root.ids.toolbar.left_action_items = [ + ['arrow-left', lambda x: self.back_press()]] + self.root.ids.toolbar.right_action_items = [ + ['refresh', + lambda x: self.root.ids.sc3.children[1].reset_composer()], + ['send', + lambda x: self.root.ids.sc3.children[1].send(self)]] + def set_toolbar_for_QrCode(self): - # """This method is use for setting Qr code toolbar.""" - # self.root.ids.toolbar.left_action_items = [ - # ['arrow-left', lambda x: self.back_press()]] - # self.root.ids.toolbar.right_action_items = [] - pass + """This method is use for setting Qr code toolbar.""" + self.root.ids.toolbar.left_action_items = [ + ['arrow-left', lambda x: self.back_press()]] + self.root.ids.toolbar.right_action_items = [] def set_common_header(self): - # """Common header for all window""" - # self.root.ids.toolbar.right_action_items = [ - # ['account-plus', lambda x: self.addingtoaddressbook()]] - # # self.root.ids.toolbar.left_action_items = [ - # # ['menu', lambda x: self.root.toggle_nav_drawer()]] + """Common header for all window""" + self.root.ids.toolbar.right_action_items = [ + ['account-plus', lambda x: self.addingtoaddressbook()]] # self.root.ids.toolbar.left_action_items = [ - # ['menu', lambda x: self.root.ids.nav_drawer.set_state("toggle")]] - # return - pass + # ['menu', lambda x: self.root.toggle_nav_drawer()]] + self.root.ids.toolbar.left_action_items = [ + ['menu', lambda x: self.root.ids.nav_drawer.set_state("toggle")]] + return def back_press(self): - # """Method for, reverting composer to previous page""" - # if self.root.ids.scr_mngr.current == 'create': - # self.save_draft() - # if self.root.ids.scr_mngr.current == \ - # 'mailDetail' and state.in_search_mode: - # toolbar_obj = self.root.ids.toolbar - # toolbar_obj.left_action_items = [ - # ['arrow-left', lambda x: self.closeSearchScreen()]] - # toolbar_obj.right_action_items = [] - # self.root.ids.toolbar.title = '' - # else: - # self.set_common_header() - # if self.root.ids.scr_mngr.current == 'chroom' and state.association: - # self.root.ids.scr_mngr.transition = FallOutTransition() - # address_label = self.current_address_label( - # BMConfigParser().get( - # state.association, 'label'), state.association) - # self.root.ids.toolbar.title = address_label - # self.root.ids.scr_mngr.current = 'inbox' \ - # if state.in_composer else 'allmails'\ - # if state.is_allmail else state.detailPageType\ - # if state.detailPageType else 'myaddress'\ - # if self.root.ids.scr_mngr.current == 'showqrcode' else 'payment'\ - # if self.root.ids.scr_mngr.current == 'pay-options' else 'chlist'\ - # if self.root.ids.scr_mngr.current == 'chroom' else 'inbox' - # if self.root.ids.scr_mngr.current == 'chlist': - # self.root.ids.scr_mngr.transition = SlideTransition() - # self.root.ids.scr_mngr.transition.direction = 'right' - # self.root.ids.scr_mngr.transition.bind(on_complete=self.reset) - # if state.is_allmail or state.detailPageType == 'draft': - # state.is_allmail = False - # state.detailPageType = '' - # state.in_composer = False - pass + """Method for, reverting composer to previous page""" + if self.root.ids.scr_mngr.current == 'create': + self.save_draft() + if self.root.ids.scr_mngr.current == \ + 'mailDetail' and state.in_search_mode: + toolbar_obj = self.root.ids.toolbar + toolbar_obj.left_action_items = [ + ['arrow-left', lambda x: self.closeSearchScreen()]] + toolbar_obj.right_action_items = [] + self.root.ids.toolbar.title = '' + else: + self.set_common_header() + if self.root.ids.scr_mngr.current == 'chroom' and state.association: + self.root.ids.scr_mngr.transition = FallOutTransition() + address_label = self.current_address_label( + BMConfigParser().get( + state.association, 'label'), state.association) + self.root.ids.toolbar.title = address_label + self.root.ids.scr_mngr.current = 'inbox' \ + if state.in_composer else 'allmails'\ + if state.is_allmail else state.detailPageType\ + if state.detailPageType else 'myaddress'\ + if self.root.ids.scr_mngr.current == 'showqrcode' else 'payment'\ + if self.root.ids.scr_mngr.current == 'pay-options' else 'chlist'\ + if self.root.ids.scr_mngr.current == 'chroom' else 'inbox' + if self.root.ids.scr_mngr.current == 'chlist': + self.root.ids.scr_mngr.transition = SlideTransition() + self.root.ids.scr_mngr.transition.direction = 'right' + self.root.ids.scr_mngr.transition.bind(on_complete=self.reset) + if state.is_allmail or state.detailPageType == 'draft': + state.is_allmail = False + state.detailPageType = '' + state.in_composer = False + @staticmethod def get_inbox_count(): - # """Getting inbox count""" + """Getting inbox count""" # state.inbox_count = str(sqlQuery( # "SELECT COUNT(*) FROM inbox WHERE toaddress = '{}' and" # " folder = 'inbox' ;".format(state.association))[0][0]) pass + @staticmethod def get_sent_count(): - # """Getting sent count""" + """Getting sent count""" # state.sent_count = str(sqlQuery( # "SELECT COUNT(*) FROM sent WHERE fromaddress = '{}' and" # " folder = 'sent' ;".format(state.association))[0][0]) pass + def set_message_count(self): """Setting message count""" # msg_counter_objs = state.kivyapp.root.children[0].children[0].ids @@ -704,17 +680,17 @@ class NavigateApp(MDApp): # "SELECT COUNT(*) FROM sent WHERE fromaddress = '{}' and" # " folder = 'draft' ;".format(state.association))[0][0]) # state.all_count = str(int(state.sent_count) + int(state.inbox_count)) + pass # if msg_counter_objs: # msg_counter_objs.send_cnt.badge_text = state.sent_count # msg_counter_objs.inbox_cnt.badge_text = state.inbox_count # msg_counter_objs.trash_cnt.badge_text = state.trash_count # msg_counter_objs.draft_cnt.badge_text = state.draft_count # msg_counter_objs.allmail_cnt.badge_text = state.all_count - pass + def on_start(self): - # """Setting message count""" - # self.set_message_count() - pass + """Setting message count""" + self.set_message_count() # @staticmethod # def on_stop(): @@ -726,122 +702,119 @@ class NavigateApp(MDApp): @staticmethod def current_address_label(current_add_label=None, current_addr=None): """Getting current address labels""" - # addresses = [addr for addr in BMConfigParser().addresses() - # if BMConfigParser().get(str(addr), 'enabled') == 'true'] - # if addresses: - # if current_add_label: - # first_name = current_add_label - # addr = current_addr - # else: - # addr = addresses[0] - # first_name = BMConfigParser().get(addr, 'label') - # if BMConfigParser().get(addr, 'enabled') != 'true': - # return '' - # f_name = first_name.split() - # label = f_name[0][:14].capitalize() + '...' if len( - # f_name[0]) > 15 else f_name[0].capitalize() - # address = ' (' + addr + ')' - # return label + address - # return '' - + addresses = [addr for addr in BMConfigParser().addresses() + if BMConfigParser().get(str(addr), 'enabled') == 'true'] + if addresses: + if current_add_label: + first_name = current_add_label + addr = current_addr + else: + addr = addresses[0] + first_name = BMConfigParser().get(addr, 'label') + if BMConfigParser().get(addr, 'enabled') != 'true': + return '' + f_name = first_name.split() + label = f_name[0][:14].capitalize() + '...' if len( + f_name[0]) > 15 else f_name[0].capitalize() + address = ' (' + addr + ')' + return label + address + return '' + def searchQuery(self, instance): - # """Showing searched mails""" - # state.search_screen = self.root.ids.scr_mngr.current - # state.searcing_text = str(instance.text).strip() - # if instance.focus and state.searcing_text: - # toolbar_obj = self.root.ids.toolbar - # toolbar_obj.left_action_items = [ - # ['arrow-left', lambda x: self.closeSearchScreen()]] - # toolbar_obj.right_action_items = [] - # self.root.ids.toolbar.title = '' - # state.in_search_mode = True - pass + """Showing searched mails""" + state.search_screen = self.root.ids.scr_mngr.current + state.searcing_text = str(instance.text).strip() + if instance.focus and state.searcing_text: + toolbar_obj = self.root.ids.toolbar + toolbar_obj.left_action_items = [ + ['arrow-left', lambda x: self.closeSearchScreen()]] + toolbar_obj.right_action_items = [] + self.root.ids.toolbar.title = '' + state.in_search_mode = True def closeSearchScreen(self): """Function for close search screen""" - # self.set_common_header() - # if state.association: - # address_label = self.current_address_label( - # BMConfigParser().get( - # state.association, 'label'), state.association) - # self.root.ids.toolbar.title = address_label - # state.searcing_text = '' - # self.refreshScreen() - # state.in_search_mode = False - pass + self.set_common_header() + if state.association: + address_label = self.current_address_label( + BMConfigParser().get( + state.association, 'label'), state.association) + self.root.ids.toolbar.title = address_label + state.searcing_text = '' + self.refreshScreen() + state.in_search_mode = False def refreshScreen(self): - # """Method show search button only on inbox or sent screen""" - # # pylint: disable=unused-variable - # state.searcing_text = '' - # if state.search_screen == 'inbox': - # self.root.ids.sc1.ids.inbox_search.ids.search_field.text = '' - # # try: - # # self.root.ids.sc1.children[ - # # 3].children[2].ids.search_field.text = '' - # # except Exception: - # # self.root.ids.sc1.children[ - # # 2].children[2].ids.search_field.text = '' - # self.root.ids.sc1.children[1].active = True - # Clock.schedule_once(self.search_callback, 0.5) - # elif state.search_screen == 'addressbook': - # self.root.ids.sc11.ids.address_search.ids.search_field.text = '' - # # self.root.ids.sc11.children[ - # # 2].children[2].ids.search_field.text = '' - # self.root.ids.sc11.children[ - # 1].active = True - # Clock.schedule_once(self.search_callback, 0.5) - # elif state.search_screen == 'myaddress': - # self.root.ids.sc10.ids.search_bar.ids.search_field.text = '' - # # try: - # # self.root.ids.sc10.children[ - # # 1].children[2].ids.search_field.text = '' - # # except Exception: - # # self.root.ids.sc10.children[ - # # 2].children[2].ids.search_field.text = '' - # self.loadMyAddressScreen(True) - # Clock.schedule_once(self.search_callback, 0.5) - # else: - # self.root.ids.sc4.ids.sent_search.ids.search_field.text = '' - # # self.root.ids.sc4.children[ - # # 2].children[2].ids.search_field.text = '' - # self.root.ids.sc4.children[1].active = True - # Clock.schedule_once(self.search_callback, 0.5) - # return - pass + """Method show search button only on inbox or sent screen""" + # pylint: disable=unused-variable + state.searcing_text = '' + if state.search_screen == 'inbox': + self.root.ids.sc1.ids.inbox_search.ids.search_field.text = '' + # try: + # self.root.ids.sc1.children[ + # 3].children[2].ids.search_field.text = '' + # except Exception: + # self.root.ids.sc1.children[ + # 2].children[2].ids.search_field.text = '' + self.root.ids.sc1.children[1].active = True + Clock.schedule_once(self.search_callback, 0.5) + elif state.search_screen == 'addressbook': + self.root.ids.sc11.ids.address_search.ids.search_field.text = '' + # self.root.ids.sc11.children[ + # 2].children[2].ids.search_field.text = '' + self.root.ids.sc11.children[ + 1].active = True + Clock.schedule_once(self.search_callback, 0.5) + elif state.search_screen == 'myaddress': + self.root.ids.sc10.ids.search_bar.ids.search_field.text = '' + # try: + # self.root.ids.sc10.children[ + # 1].children[2].ids.search_field.text = '' + # except Exception: + # self.root.ids.sc10.children[ + # 2].children[2].ids.search_field.text = '' + self.loadMyAddressScreen(True) + Clock.schedule_once(self.search_callback, 0.5) + else: + self.root.ids.sc4.ids.sent_search.ids.search_field.text = '' + # self.root.ids.sc4.children[ + # 2].children[2].ids.search_field.text = '' + self.root.ids.sc4.children[1].active = True + Clock.schedule_once(self.search_callback, 0.5) + return def set_identicon(self, text): - # """Show identicon in address spinner""" - # img = identiconGeneration.generate(text) - # # self.root.children[0].children[0].ids.btn.children[1].texture = (img.texture) - # # below line is for displaing logo - # self.root.ids.content_drawer.ids.top_box.children[0].texture = (img.texture) - pass + """Show identicon in address spinner""" + img = identiconGeneration.generate(text) + # self.root.children[0].children[0].ids.btn.children[1].texture = (img.texture) + # below line is for displaing logo + self.root.ids.content_drawer.ids.top_box.children[0].texture = (img.texture) + def set_mail_detail_header(self): - # """Setting the details of the page""" - # if state.association and state.in_search_mode: - # address_label = self.current_address_label( - # BMConfigParser().get( - # state.association, 'label'), state.association) - # self.root.ids.toolbar.title = address_label - # toolbar_obj = self.root.ids.toolbar - # toolbar_obj.left_action_items = [ - # ['arrow-left', lambda x: self.back_press()]] - # delete_btn = ['delete-forever', - # lambda x: self.root.ids.sc14.delete_mail()] - # dynamic_list = [] - # if state.detailPageType == 'inbox': - # dynamic_list = [ - # ['reply', lambda x: self.root.ids.sc14.inbox_reply()], - # delete_btn] - # elif state.detailPageType == 'sent': - # dynamic_list = [delete_btn] - # elif state.detailPageType == 'draft': - # dynamic_list = [ - # ['pencil', lambda x: self.root.ids.sc14.write_msg(self)], - # delete_btn] - # toolbar_obj.right_action_items = dynamic_list - pass + """Setting the details of the page""" + if state.association and state.in_search_mode: + address_label = self.current_address_label( + BMConfigParser().get( + state.association, 'label'), state.association) + self.root.ids.toolbar.title = address_label + toolbar_obj = self.root.ids.toolbar + toolbar_obj.left_action_items = [ + ['arrow-left', lambda x: self.back_press()]] + delete_btn = ['delete-forever', + lambda x: self.root.ids.sc14.delete_mail()] + dynamic_list = [] + if state.detailPageType == 'inbox': + dynamic_list = [ + ['reply', lambda x: self.root.ids.sc14.inbox_reply()], + delete_btn] + elif state.detailPageType == 'sent': + dynamic_list = [delete_btn] + elif state.detailPageType == 'draft': + dynamic_list = [ + ['pencil', lambda x: self.root.ids.sc14.write_msg(self)], + delete_btn] + toolbar_obj.right_action_items = dynamic_list + def load_screen(self, instance): """This method is used for loading screen on every click""" if instance.text == 'Inbox': @@ -890,53 +863,50 @@ class NavigateApp(MDApp): return True def file_manager_open(self): - # """This method open the file manager of local system""" - # from kivymd.uix.filemanager import MDFileManager + """This method open the file manager of local system""" + from kivymd.uix.filemanager import MDFileManager - # if not self.file_manager: - # self.file_manager = MDFileManager( - # exit_manager=self.exit_manager, - # select_path=self.select_path, - # ext=['.png', '.jpg'] - # ) - # self.file_manager.previous = False - # self.file_manager.current_path = '/' - # if platform == 'android': - # from android.permissions import request_permissions, Permission, check_permission - # if check_permission(Permission.WRITE_EXTERNAL_STORAGE) and \ - # check_permission(Permission.READ_EXTERNAL_STORAGE): - # self.file_manager.show(os.getenv('EXTERNAL_STORAGE')) - # self.manager_open = True - # else: - # request_permissions([Permission.WRITE_EXTERNAL_STORAGE, Permission.READ_EXTERNAL_STORAGE]) - # else: - # self.file_manager.show(os.environ["HOME"]) - # self.manager_open = True - pass + if not self.file_manager: + self.file_manager = MDFileManager( + exit_manager=self.exit_manager, + select_path=self.select_path, + ext=['.png', '.jpg'] + ) + self.file_manager.previous = False + self.file_manager.current_path = '/' + if platform == 'android': + from android.permissions import request_permissions, Permission, check_permission + if check_permission(Permission.WRITE_EXTERNAL_STORAGE) and \ + check_permission(Permission.READ_EXTERNAL_STORAGE): + self.file_manager.show(os.getenv('EXTERNAL_STORAGE')) + self.manager_open = True + else: + request_permissions([Permission.WRITE_EXTERNAL_STORAGE, Permission.READ_EXTERNAL_STORAGE]) + else: + self.file_manager.show(os.environ["HOME"]) + self.manager_open = True def select_path(self, path): """This method is used to save the select image""" - # try: - # from PIL import Image as PilImage - # newImg = PilImage.open(path).resize((300, 300)) - # if platform == 'android': - # android_path = os.path.join( - # os.environ['ANDROID_PRIVATE'] + '/app' + '/images' + '/kivy/') - # if not os.path.exists(android_path + '/default_identicon/'): - # os.makedirs(android_path + '/default_identicon/') - # newImg.save('{1}/default_identicon/{0}.png'.format( - # state.association, android_path)) - # else: - # if not os.path.exists(state.imageDir + '/default_identicon/'): - # os.makedirs(state.imageDir + '/default_identicon/') - # newImg.save(state.imageDir + '/default_identicon/{0}.png'.format(state.association)) - # self.load_selected_Image(state.association) - # toast('Image changed') - # except Exception: - # toast('Exit') - # self.exit_manager() - pass - + try: + from PIL import Image as PilImage + newImg = PilImage.open(path).resize((300, 300)) + if platform == 'android': + android_path = os.path.join( + os.environ['ANDROID_PRIVATE'] + '/app' + '/images' + '/kivy/') + if not os.path.exists(android_path + '/default_identicon/'): + os.makedirs(android_path + '/default_identicon/') + newImg.save('{1}/default_identicon/{0}.png'.format( + state.association, android_path)) + else: + if not os.path.exists(state.imageDir + '/default_identicon/'): + os.makedirs(state.imageDir + '/default_identicon/') + newImg.save(state.imageDir + '/default_identicon/{0}.png'.format(state.association)) + self.load_selected_Image(state.association) + toast('Image changed') + except Exception: + toast('Exit') + self.exit_manager() def exit_manager(self, *args): """Called when the user reaches the root of the directory tree.""" @@ -944,68 +914,64 @@ class NavigateApp(MDApp): self.file_manager.close() def load_selected_Image(self, curerentAddr): - # """This method load the selected image on screen""" - # top_box_obj = self.root.ids.content_drawer.ids.top_box.children[0] - # # spinner_img_obj = self.root.ids.content_drawer.ids.btn.children[1] - # # spinner_img_obj.source = top_box_obj.source ='./images/default_identicon/{0}.png'.format(curerentAddr) - # top_box_obj.source = state.imageDir + '/default_identicon/{0}.png'.format(curerentAddr) - # self.root.ids.content_drawer.ids.reset_image.opacity = 1 - # self.root.ids.content_drawer.ids.reset_image.disabled = False - # top_box_obj.reload() - pass + """This method load the selected image on screen""" + top_box_obj = self.root.ids.content_drawer.ids.top_box.children[0] + # spinner_img_obj = self.root.ids.content_drawer.ids.btn.children[1] + # spinner_img_obj.source = top_box_obj.source ='./images/default_identicon/{0}.png'.format(curerentAddr) + top_box_obj.source = state.imageDir + '/default_identicon/{0}.png'.format(curerentAddr) + self.root.ids.content_drawer.ids.reset_image.opacity = 1 + self.root.ids.content_drawer.ids.reset_image.disabled = False + top_box_obj.reload() # spinner_img_obj.reload() def rest_default_avatar_img(self): - # """set default avatar generated image""" - # self.set_identicon(state.association) - # img_path = state.imageDir + '/default_identicon/{}.png'.format(state.association) - # try: - # if os.path.exists(img_path): - # os.remove(img_path) - # self.root.ids.content_drawer.ids.reset_image.opacity = 0 - # self.root.ids.content_drawer.ids.reset_image.disabled = True - # except Exception as e: - # pass - # toast('Avatar reset') - pass + """set default avatar generated image""" + self.set_identicon(state.association) + img_path = state.imageDir + '/default_identicon/{}.png'.format(state.association) + try: + if os.path.exists(img_path): + os.remove(img_path) + self.root.ids.content_drawer.ids.reset_image.opacity = 0 + self.root.ids.content_drawer.ids.reset_image.disabled = True + except Exception as e: + pass + toast('Avatar reset') def copy_composer_text(self, text): # pylint: disable=no-self-use - # """Copy the data from mail detail page""" - # Clipboard.copy(text) - # toast('Copied') - pass + """Copy the data from mail detail page""" + Clipboard.copy(text) + toast('Copied') def reset_login_screen(self): """This method is used for clearing random screen""" - # if self.root.ids.sc7.ids.add_random_bx.children: - # self.root.ids.sc7.ids.add_random_bx.clear_widgets() - pass + if self.root.ids.sc7.ids.add_random_bx.children: + self.root.ids.sc7.ids.add_random_bx.clear_widgets() def open_payment_layout(self, sku): """It basically open up a payment layout for kivy Ui""" - # pml = PaymentMethodLayout() - # self.product_id = sku - # self.custom_sheet = MDCustomBottomSheet(screen=pml) - # self.custom_sheet.open() - pass + pml = PaymentMethodLayout() + self.product_id = sku + self.custom_sheet = MDCustomBottomSheet(screen=pml) + self.custom_sheet.open() + def initiate_purchase(self, method_name): """initiate_purchase module""" - # print("Purchasing {} through {}".format(self.product_id, method_name)) - pass + print("Purchasing {} through {}".format(self.product_id, method_name)) + def _after_scan(self, text): # if platform == 'android': # toast_txt = cast(CharSequence, String(text)) # show_toast(toast_txt, Toast.LENGTH_SHORT) - # if self.root.ids.sc23.previous_open_screen == 'composer': - # self.root.ids.sc3.children[1].ids.txt_input.text = text - # self.root.ids.scr_mngr.current = 'create' - # elif self.root.ids.sc23.previous_open_screen: - # back_screen = self.root.ids.sc23.previous_open_screen - # self.root.ids.scr_mngr.current = 'inbox' if back_screen == 'scanscreen' else back_screen - # add_obj = self.root.ids.sc23.pop_up_instance - # add_obj.content_cls.ids.address.text = text - # Clock.schedule_once(partial(self.open_popup, add_obj), .5) - pass + if self.root.ids.sc23.previous_open_screen == 'composer': + self.root.ids.sc3.children[1].ids.txt_input.text = text + self.root.ids.scr_mngr.current = 'create' + elif self.root.ids.sc23.previous_open_screen: + back_screen = self.root.ids.sc23.previous_open_screen + self.root.ids.scr_mngr.current = 'inbox' if back_screen == 'scanscreen' else back_screen + add_obj = self.root.ids.sc23.pop_up_instance + add_obj.content_cls.ids.address.text = text + Clock.schedule_once(partial(self.open_popup, add_obj), .5) + @staticmethod def open_popup(instance, dt): """This method is used for opening popup""" diff --git a/src/tests/mock/pybitmessage/state.py b/src/tests/mock/pybitmessage/state.py index be81992d..62848c25 100644 --- a/src/tests/mock/pybitmessage/state.py +++ b/src/tests/mock/pybitmessage/state.py @@ -1,41 +1,30 @@ """ -Global runtime variables. +src/state.py +================================= """ +import collections neededPubkeys = {} streamsInWhichIAmParticipating = [] - +# For UPnP extPort = None -"""For UPnP""" - +# for Tor hidden service socksIP = None -"""for Tor hidden service""" - -appdata = '' -"""holds the location of the application data storage directory""" - +# Network protocols availability, initialised below +networkProtocolAvailability = None +appdata = '' # holds the location of the application data storage directory +# Set to 1 by the doCleanShutdown function. +# Used to tell the proof of work worker threads to exit. shutdown = 0 -""" -Set to 1 by the `.shutdown.doCleanShutdown` function. -Used to tell the threads to exit. -""" - # Component control flags - set on startup, do not change during runtime # The defaults are for standalone GUI (default operating mode) -enableNetwork = True -"""enable network threads""" -enableObjProc = True -"""enable object processing thread""" -enableAPI = True -"""enable API (if configured)""" -enableGUI = True -"""enable GUI (QT or ncurses)""" -enableSTDIO = False -"""enable STDIO threads""" -enableKivy = False -"""enable kivy app and test cases""" +enableNetwork = True # enable network threads +enableObjProc = True # enable object processing threads +enableAPI = True # enable API (if configured) +enableGUI = True # enable GUI (QT or ncurses) +enableSTDIO = False # enable STDIO threads curses = False - +sqlReady = False # set to true by sqlTread when ready for processing maximumNumberOfHalfOpenConnections = 0 maximumLengthOfTimeToBotherResendingMessages = 0 @@ -44,15 +33,85 @@ invThread = None addrThread = None downloadThread = None uploadThread = None - ownAddresses = {} - +# If the trustedpeer option is specified in keys.dat then this will +# contain a Peer which will be connected to instead of using the +# addresses advertised by other peers. The client will only connect to +# this peer and the timing attack mitigation will be disabled in order +# to download data faster. The expected use case is where the user has +# a fast connection to a trusted server where they run a BitMessage +# daemon permanently. If they then run a second instance of the client +# on a local machine periodically when they want to check for messages +# it will sync with the network a lot faster without compromising +# security. +trustedPeer = None discoveredPeers = {} +Peer = collections.namedtuple('Peer', ['host', 'port']) + + +def resetNetworkProtocolAvailability(): + """This method helps to reset the availability of network protocol""" + # pylint: disable=global-statement + global networkProtocolAvailability + networkProtocolAvailability = {'IPv4': None, 'IPv6': None, 'onion': None} + + +resetNetworkProtocolAvailability() dandelion = 0 testmode = False +kivy = False + +association = '' + +kivyapp = None + +navinstance = None + +mail_id = 0 + +myAddressObj = None + +detailPageType = None + +ackdata = None + +status = None + +screen_density = None + +msg_counter_objs = None + +check_sent_acc = None + +sent_count = 0 + +inbox_count = 0 + +trash_count = 0 + +draft_count = 0 + +all_count = 0 + +searcing_text = '' + +search_screen = '' + +send_draft_mail = None + +is_allmail = False + +in_composer = False + +availabe_credit = 0 + +in_sent_method = False + +in_search_mode = False + clientHasReceivedIncomingConnections = False """used by API command clientStatus""" @@ -70,3 +129,5 @@ ackdataForWhichImWatching = {} thisapp = None """Singleton instance""" + +imageDir = None