Reduce overdraw on main tabs

Fix e2e when swip-to-delete item
This commit is contained in:
Roman Volosovskyi 2019-03-18 10:37:02 +02:00
parent e87d93c820
commit f25cf1a0f9
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
9 changed files with 16 additions and 27 deletions

View File

@ -83,7 +83,6 @@
:flex 1 :flex 1
:flex-direction :row :flex-direction :row
:align-items :center :align-items :center
:background-color colors/white
:height (if large? 82 52)}) :height (if large? 82 52)})
(defn settings-item-icon (defn settings-item-icon
@ -173,8 +172,7 @@
:android {:margin-bottom 3} :android {:margin-bottom 3}
:ios {:margin-bottom 10}}) :ios {:margin-bottom 10}})
(def section-header-container (def section-header-container {})
{:background-color colors/white})
(def action-list (def action-list
{:background-color colors/blue}) {:background-color colors/blue})

View File

@ -14,7 +14,6 @@
(defstyle chat-container (defstyle chat-container
{:flex-direction :row {:flex-direction :row
:background-color colors/white
:android {:height 76} :android {:height 76}
:ios {:height 74} :ios {:height 74}
:overflow :hidden}) :overflow :hidden})

View File

@ -88,7 +88,6 @@
false)})) false)}))
[list/flat-list {:data all-home-items [list/flat-list {:data all-home-items
:key-fn first :key-fn first
:end-fill-color colors/white
:footer [react/view :footer [react/view
{:style {:height tabs.styles/tabs-diff {:style {:height tabs.styles/tabs-diff
:align-self :stretch}}] :align-self :stretch}}]
@ -119,8 +118,7 @@
(when loading? (utils/set-timeout #(re-frame/dispatch [:init-rest-of-chats]) 100))))} (when loading? (utils/set-timeout #(re-frame/dispatch [:init-rest-of-chats]) 100))))}
[react/view {:flex 1} [react/view {:flex 1}
[status-bar/status-bar {:type :main}] [status-bar/status-bar {:type :main}]
[react/keyboard-avoiding-view {:style {:flex 1 [react/keyboard-avoiding-view {:style {:flex 1}}
:background-color :white}}
[toolbar/toolbar nil nil [toolbar/content-title (i18n/label :t/chat)]] [toolbar/toolbar nil nil [toolbar/content-title (i18n/label :t/chat)]]
[les-debug-info] [les-debug-info]
(cond loading? (cond loading?

View File

@ -54,7 +54,6 @@
:flex 1 :flex 1
:flex-direction :row :flex-direction :row
:align-items :center :align-items :center
:background-color colors/white
:height 52}) :height 52})
(def settings-item-icon (def settings-item-icon
@ -102,10 +101,8 @@
{:align-items :center}) {:align-items :center})
(def profile (def profile
{:flex 1 {:flex 1
:background-color colors/white :flex-direction :column})
:flex-direction :column})
(def profile-form (def profile-form
{:background-color colors/white {:padding-vertical 16})
:padding-vertical 16})

View File

@ -23,8 +23,7 @@
{:margin-top 12 {:margin-top 12
:margin-bottom 16}) :margin-bottom 16})
(defstyle my-profile-info-container (defstyle my-profile-info-container {})
{:background-color colors/white})
(defstyle my-profile-settings-logout-wrapper (defstyle my-profile-settings-logout-wrapper
{:flex-direction :row {:flex-direction :row

View File

@ -323,7 +323,6 @@
[contacts-list-item active-contacts-count] [contacts-list-item active-contacts-count]
(when config/tr-to-talk-enabled? (when config/tr-to-talk-enabled?
[tribute-to-talk-item snt-amount tribute-to-talk-seen?]) [tribute-to-talk-item snt-amount tribute-to-talk-seen?])
[react/view styles/my-profile-info-container [my-profile-settings current-account shown-account currency (nil? login-data)]
[my-profile-settings current-account shown-account currency (nil? login-data)]]
(when (nil? login-data) (when (nil? login-data)
[advanced shown-account on-show-advanced])]]]))) [advanced shown-account on-show-advanced])]]])))

View File

@ -5,8 +5,7 @@
;; Main section ;; Main section
(defstyle main-section (defstyle main-section
{:flex 1 {:flex 1})
:background-color colors/blue})
(defstyle scroll-bottom (defstyle scroll-bottom
{:background-color colors/white {:background-color colors/white
@ -85,10 +84,9 @@
;; Assets section ;; Assets section
(def asset-section (def asset-section
{:flex 1 {:flex 1
:padding-top 5 :padding-top 5
:padding-bottom 20 :padding-bottom 20})
:background-color colors/white})
(def asset-section-header (def asset-section-header
{:font-size 15 {:font-size 15

View File

@ -71,7 +71,8 @@
(defview toolbar-view [] (defview toolbar-view []
(letsubs [settings [:wallet/settings] (letsubs [settings [:wallet/settings]
{address :address} [:account/account]] {address :address} [:account/account]]
[toolbar/toolbar {:transparent? true} [toolbar/toolbar {:style {:background-color colors/blue
:border-bottom-width 0}}
nil nil
[toolbar/content-wrapper] [toolbar/content-wrapper]
[toolbar/actions [toolbar/actions

View File

@ -60,18 +60,18 @@ class ChatElement(BaseButton):
class DeleteButton(BaseButton): class DeleteButton(BaseButton):
def __init__(self, driver, parent_locator: str): def __init__(self, driver, parent_locator: str):
super(DeleteButton, self).__init__(driver) super(DeleteButton, self).__init__(driver)
locator_str = "/../../android.view.ViewGroup/*[@content-desc='icon']" locator_str = "/..//*[@content-desc='icon']"
self.locator = self.Locator.xpath_selector(parent_locator + locator_str) self.locator = self.Locator.xpath_selector(parent_locator + locator_str)
return DeleteButton(self.driver, self.locator.value) return DeleteButton(self.driver, self.locator.value)
def swipe_and_delete(self): def swipe_and_delete(self):
counter = 0 counter = 0
while counter < 10: while counter < 3:
self.swipe_element() self.swipe_element()
if self.swipe_delete_button.is_element_present(): if self.swipe_delete_button.is_element_present():
break break
time.sleep(10) time.sleep(3)
counter += 1 counter += 1
self.swipe_delete_button.click() self.swipe_delete_button.click()