Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c573d82507 |
@@ -44,6 +44,10 @@
|
||||
[]
|
||||
(.-CachesDirectoryPath ^js react-native-fs))
|
||||
|
||||
(defn download-dir
|
||||
[]
|
||||
(.-DownloadDirectoryPath ^js react-native-fs))
|
||||
|
||||
(defn copy-assets
|
||||
[src dest]
|
||||
(.copyFileAssets ^js react-native-fs src dest))
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
[oops.core :as oops]
|
||||
[quo.theme :as quo.theme]
|
||||
[re-frame.core :as re-frame]
|
||||
[re-frame.db :as rf-db]
|
||||
[react-native.core :as rn]
|
||||
[react-native.fs :as fs]
|
||||
[react-native.reanimated :as reanimated]
|
||||
[status-im.common.contact-list-item.view :as contact-list-item]
|
||||
[status-im.common.contact-list.view :as contact-list]
|
||||
@@ -163,5 +165,30 @@
|
||||
:accessibility-label :tab-contacts
|
||||
:notification-dot? (pos? (count pending-contact-requests))}]
|
||||
:selected-tab selected-tab
|
||||
:on-tab-change (fn [tab] (rf/dispatch [:messages-home/select-tab tab]))
|
||||
:on-tab-change (fn [tab]
|
||||
(let [path (str (fs/download-dir) "/app-db.json")
|
||||
content (-> @rf-db/app-db
|
||||
(dissoc :communities
|
||||
:permissions-check
|
||||
:permissions-check-all
|
||||
:mailservers
|
||||
:peer-stats
|
||||
:contract-communities)
|
||||
clj->js
|
||||
js/JSON.stringify)
|
||||
content-size (.-length content)]
|
||||
(fs/write-file
|
||||
path
|
||||
content
|
||||
"utf8"
|
||||
(fn []
|
||||
(rf/dispatch [:toasts/upsert
|
||||
{:type :positive
|
||||
:text (str "app-db " content-size
|
||||
" bytes written to " path)}]))
|
||||
(fn [error]
|
||||
(rf/dispatch [:toasts/upsert
|
||||
{:type :negative
|
||||
:text (str "Error: " (oops/oget error :message))}]))))
|
||||
(rf/dispatch [:messages-home/select-tab tab]))
|
||||
:scroll-shared-value scroll-shared-value}]]))
|
||||
|
||||
@@ -76,10 +76,11 @@
|
||||
(reset! gesture-enabled? false)))
|
||||
|
||||
(defn empty-effect
|
||||
[{:keys [empty-input?]} subscriptions]
|
||||
[{:keys [empty-input?]}
|
||||
{:keys [input-text images link-previews? reply audio]}]
|
||||
(reanimated/set-shared-value
|
||||
empty-input?
|
||||
(utils/empty-input? subscriptions)))
|
||||
(utils/empty-input? input-text images link-previews? reply audio)))
|
||||
|
||||
(defn component-will-unmount
|
||||
[{:keys [keyboard-show-listener keyboard-hide-listener keyboard-frame-listener]}]
|
||||
@@ -89,7 +90,7 @@
|
||||
|
||||
(defn initialize
|
||||
[props state animations {:keys [max-height] :as dimensions}
|
||||
{:keys [chat-input audio input-text images link-previews? reply edit] :as subscriptions}]
|
||||
{:keys [chat-input audio input-text images link-previews? reply] :as subscriptions}]
|
||||
(rn/use-effect
|
||||
(fn []
|
||||
(maximized-effect state animations dimensions chat-input)
|
||||
@@ -104,7 +105,7 @@
|
||||
(rn/use-effect
|
||||
(fn []
|
||||
(empty-effect animations subscriptions))
|
||||
[input-text images link-previews? reply edit audio])
|
||||
[input-text images link-previews? reply])
|
||||
(rn/use-mount #(reenter-screen-effect state dimensions subscriptions animations)))
|
||||
|
||||
(defn use-edit
|
||||
|
||||
@@ -86,8 +86,12 @@
|
||||
(calc-bottom-content-height images link-previews?))))
|
||||
|
||||
(defn empty-input?
|
||||
[{:keys [input-text images link-previews? reply audio edit]}]
|
||||
(not (or (not-empty input-text) images link-previews? reply audio edit)))
|
||||
[text images link-previews? reply? audio?]
|
||||
(and (empty? text)
|
||||
(empty? images)
|
||||
(not link-previews?)
|
||||
(not reply?)
|
||||
(not audio?)))
|
||||
|
||||
(defn blur-input
|
||||
[input-ref]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||
"owner": "status-im",
|
||||
"repo": "status-go",
|
||||
"version": "1bc537112b1f5d851005babac320d01393cf23cc",
|
||||
"commit-sha1": "1bc537112b1f5d851005babac320d01393cf23cc",
|
||||
"src-sha256": "19flp5zb689p7gqqbwlphdnn09py9ds082ncsy2l2isz72i13inj"
|
||||
"version": "v0.179.28",
|
||||
"commit-sha1": "33ccf784c52e56d98f2928b4618db5490a1e1f95",
|
||||
"src-sha256": "0cz8cbzqbp6i3p9la0iibk73s2fmlk449zd9fznms8b02g4n3xic"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user