[#10239] Remove "Fetch last 24 hours" option
This commit is contained in:
parent
473c5135b2
commit
35381a55c0
|
@ -248,11 +248,6 @@
|
||||||
(fn [cofx _]
|
(fn [cofx _]
|
||||||
(mailserver/check-connection cofx)))
|
(mailserver/check-connection cofx)))
|
||||||
|
|
||||||
(handlers/register-handler-fx
|
|
||||||
:mailserver/fetch-history
|
|
||||||
(fn [cofx [_ chat-id from-timestamp]]
|
|
||||||
(mailserver/fetch-history cofx chat-id {:from from-timestamp})))
|
|
||||||
|
|
||||||
(handlers/register-handler-fx
|
(handlers/register-handler-fx
|
||||||
:mailserver.callback/generate-mailserver-symkey-success
|
:mailserver.callback/generate-mailserver-symkey-success
|
||||||
(fn [cofx [_ mailserver sym-key-id]]
|
(fn [cofx [_ mailserver sym-key-id]]
|
||||||
|
@ -381,28 +376,6 @@
|
||||||
(re-frame/dispatch [:bottom-sheet/hide])
|
(re-frame/dispatch [:bottom-sheet/hide])
|
||||||
(re-frame/dispatch [:chat.ui/clear-history chat-id]))}}))
|
(re-frame/dispatch [:chat.ui/clear-history chat-id]))}}))
|
||||||
|
|
||||||
(handlers/register-handler-fx
|
|
||||||
:chat.ui/fetch-history-pressed
|
|
||||||
(fn [{:keys [now] :as cofx} [_ chat-id]]
|
|
||||||
(mailserver/fetch-history cofx chat-id
|
|
||||||
{:from (- (quot now 1000) mailserver.constants/one-day)})))
|
|
||||||
|
|
||||||
(handlers/register-handler-fx
|
|
||||||
:chat.ui/fetch-history-pressed48-60
|
|
||||||
(fn [{:keys [now] :as cofx} [_ chat-id]]
|
|
||||||
(let [now (quot now 1000)]
|
|
||||||
(mailserver/fetch-history cofx chat-id
|
|
||||||
{:from (- now (* 2.5 mailserver.constants/one-day))
|
|
||||||
:to (- now (* 2 mailserver.constants/one-day))}))))
|
|
||||||
|
|
||||||
(handlers/register-handler-fx
|
|
||||||
:chat.ui/fetch-history-pressed84-96
|
|
||||||
(fn [{:keys [now] :as cofx} [_ chat-id]]
|
|
||||||
(let [now (quot now 1000)]
|
|
||||||
(mailserver/fetch-history cofx chat-id
|
|
||||||
{:from (- now (* 4 mailserver.constants/one-day))
|
|
||||||
:to (- now (* 3.5 mailserver.constants/one-day))}))))
|
|
||||||
|
|
||||||
(handlers/register-handler-fx
|
(handlers/register-handler-fx
|
||||||
:chat.ui/fill-gaps
|
:chat.ui/fill-gaps
|
||||||
(fn [{:keys [db] :as cofx} [_ gap-ids]]
|
(fn [{:keys [db] :as cofx} [_ gap-ids]]
|
||||||
|
|
|
@ -429,7 +429,6 @@
|
||||||
:export-account
|
:export-account
|
||||||
:failed
|
:failed
|
||||||
:faq
|
:faq
|
||||||
:fetch-history
|
|
||||||
:fetch-messages
|
:fetch-messages
|
||||||
:find
|
:find
|
||||||
:finish
|
:finish
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
[status-im.ethereum.json-rpc :as json-rpc]
|
[status-im.ethereum.json-rpc :as json-rpc]
|
||||||
[status-im.i18n :as i18n]
|
[status-im.i18n :as i18n]
|
||||||
[status-im.mailserver.constants :as constants]
|
[status-im.mailserver.constants :as constants]
|
||||||
[status-im.mailserver.topics :as mailserver.topics]
|
|
||||||
[status-im.multiaccounts.model :as multiaccounts.model]
|
[status-im.multiaccounts.model :as multiaccounts.model]
|
||||||
[status-im.multiaccounts.update.core :as multiaccounts.update]
|
[status-im.multiaccounts.update.core :as multiaccounts.update]
|
||||||
[status-im.native-module.core :as status]
|
[status-im.native-module.core :as status]
|
||||||
|
@ -910,26 +909,6 @@
|
||||||
:on-accept #(re-frame/dispatch [:mailserver.ui/retry-request-pressed])
|
:on-accept #(re-frame/dispatch [:mailserver.ui/retry-request-pressed])
|
||||||
:confirm-button-text (i18n/label :t/mailserver-request-retry)}}))
|
:confirm-button-text (i18n/label :t/mailserver-request-retry)}}))
|
||||||
|
|
||||||
(fx/defn fetch-history
|
|
||||||
"Retrive a list of topics given a chat id, set them to the specified
|
|
||||||
time interval and start a mailserver request"
|
|
||||||
[{:keys [db] :as cofx} chat-id {:keys [from to]}]
|
|
||||||
(let [topics (mailserver.topics/topics-for-chat
|
|
||||||
db
|
|
||||||
chat-id)]
|
|
||||||
(log/debug "fetch-history" "chat-id:" chat-id "from-timestamp:"
|
|
||||||
from "topics:" topics)
|
|
||||||
(fx/merge cofx
|
|
||||||
{:db (reduce
|
|
||||||
(fn [db topic]
|
|
||||||
(cond-> (assoc-in db [:mailserver/requests-from topic] from)
|
|
||||||
|
|
||||||
to
|
|
||||||
(assoc-in [:mailserver/requests-to topic] to)))
|
|
||||||
db
|
|
||||||
topics)}
|
|
||||||
(process-next-messages-request))))
|
|
||||||
|
|
||||||
(fx/defn fill-the-gap
|
(fx/defn fill-the-gap
|
||||||
[{:keys [db] :as cofx} {:keys [gaps topics chat-id]}]
|
[{:keys [db] :as cofx} {:keys [gaps topics chat-id]}]
|
||||||
(let [mailserver (get-mailserver-when-ready cofx)
|
(let [mailserver (get-mailserver-when-ready cofx)
|
||||||
|
|
|
@ -37,12 +37,6 @@
|
||||||
:accessibility-label :clear-history-button
|
:accessibility-label :clear-history-button
|
||||||
:icon :main-icons/close
|
:icon :main-icons/close
|
||||||
:on-press #(re-frame/dispatch [:chat.ui/clear-history-pressed chat-id])}]
|
:on-press #(re-frame/dispatch [:chat.ui/clear-history-pressed chat-id])}]
|
||||||
[quo/list-item
|
|
||||||
{:theme :accent
|
|
||||||
:title (i18n/label :t/fetch-history)
|
|
||||||
:accessibility-label :fetch-history-button
|
|
||||||
:icon :main-icons/arrow-down
|
|
||||||
:on-press #(hide-sheet-and-dispatch [:chat.ui/fetch-history-pressed chat-id])}]
|
|
||||||
[quo/list-item
|
[quo/list-item
|
||||||
{:theme :negative
|
{:theme :negative
|
||||||
:title (i18n/label :t/delete-chat)
|
:title (i18n/label :t/delete-chat)
|
||||||
|
@ -77,12 +71,6 @@
|
||||||
:accessibility-label :clear-history-button
|
:accessibility-label :clear-history-button
|
||||||
:icon :main-icons/close
|
:icon :main-icons/close
|
||||||
:on-press #(re-frame/dispatch [:chat.ui/clear-history-pressed chat-id])}]
|
:on-press #(re-frame/dispatch [:chat.ui/clear-history-pressed chat-id])}]
|
||||||
[quo/list-item
|
|
||||||
{:theme :accent
|
|
||||||
:title (i18n/label :t/fetch-history)
|
|
||||||
:accessibility-label :fetch-history-button
|
|
||||||
:icon :main-icons/arrow-down
|
|
||||||
:on-press #(hide-sheet-and-dispatch [:chat.ui/fetch-history-pressed chat-id])}]
|
|
||||||
[quo/list-item
|
[quo/list-item
|
||||||
{:theme :negative
|
{:theme :negative
|
||||||
:title (i18n/label :t/delete-chat)
|
:title (i18n/label :t/delete-chat)
|
||||||
|
@ -121,12 +109,6 @@
|
||||||
:accessibility-label :clear-history-button
|
:accessibility-label :clear-history-button
|
||||||
:icon :main-icons/close
|
:icon :main-icons/close
|
||||||
:on-press #(re-frame/dispatch [:chat.ui/clear-history-pressed chat-id])}]
|
:on-press #(re-frame/dispatch [:chat.ui/clear-history-pressed chat-id])}]
|
||||||
[quo/list-item
|
|
||||||
{:theme :accent
|
|
||||||
:title (i18n/label :t/fetch-history)
|
|
||||||
:accessibility-label :fetch-history-button
|
|
||||||
:icon :main-icons/arrow-down
|
|
||||||
:on-press #(hide-sheet-and-dispatch [:chat.ui/fetch-history-pressed chat-id])}]
|
|
||||||
(when joined?
|
(when joined?
|
||||||
[quo/list-item
|
[quo/list-item
|
||||||
{:theme :negative
|
{:theme :negative
|
||||||
|
|
|
@ -520,7 +520,6 @@
|
||||||
"faq": "الاسئله المتداولة",
|
"faq": "الاسئله المتداولة",
|
||||||
"favourites": "المفضلة",
|
"favourites": "المفضلة",
|
||||||
"favourites-empty": "ستظهر العناوين التي تمت إضافتها إلى المفضلة هنا",
|
"favourites-empty": "ستظهر العناوين التي تمت إضافتها إلى المفضلة هنا",
|
||||||
"fetch-history": "إحضار آخر ٢٤ ساعة",
|
|
||||||
"fetch-messages": "↓ جلب الرسائل",
|
"fetch-messages": "↓ جلب الرسائل",
|
||||||
"find": "العثور",
|
"find": "العثور",
|
||||||
"finish": "إنهاء",
|
"finish": "إنهاء",
|
||||||
|
|
|
@ -495,7 +495,6 @@
|
||||||
"faq": "Häufig gestellte Fragen",
|
"faq": "Häufig gestellte Fragen",
|
||||||
"favourites": "Favoriten",
|
"favourites": "Favoriten",
|
||||||
"favourites-empty": "Favorisierte Adressen werden hier angezeigt",
|
"favourites-empty": "Favorisierte Adressen werden hier angezeigt",
|
||||||
"fetch-history": "Letzten 24 Stunden abrufen",
|
|
||||||
"fetch-messages": "↓ Nachrichten abrufen",
|
"fetch-messages": "↓ Nachrichten abrufen",
|
||||||
"find": "Finden",
|
"find": "Finden",
|
||||||
"finish": "Fertig",
|
"finish": "Fertig",
|
||||||
|
|
|
@ -468,7 +468,6 @@
|
||||||
"export-account": "Export account",
|
"export-account": "Export account",
|
||||||
"failed": "Failed",
|
"failed": "Failed",
|
||||||
"faq": "Frequently asked questions",
|
"faq": "Frequently asked questions",
|
||||||
"fetch-history": "Fetch last 24 hours",
|
|
||||||
"fetch-messages": "↓ Fetch messages",
|
"fetch-messages": "↓ Fetch messages",
|
||||||
"find": "Find",
|
"find": "Find",
|
||||||
"finish": "Finish",
|
"finish": "Finish",
|
||||||
|
|
|
@ -496,7 +496,6 @@
|
||||||
"faq": "Preguntas frecuentes",
|
"faq": "Preguntas frecuentes",
|
||||||
"favourites": "Favoritos",
|
"favourites": "Favoritos",
|
||||||
"favourites-empty": "Las direcciones agregadas a favoritos aparecerán aquí",
|
"favourites-empty": "Las direcciones agregadas a favoritos aparecerán aquí",
|
||||||
"fetch-history": "Obtener las últimas 24 horas",
|
|
||||||
"fetch-messages": "↓ Recuperar mensajes",
|
"fetch-messages": "↓ Recuperar mensajes",
|
||||||
"find": "Encontrar",
|
"find": "Encontrar",
|
||||||
"finish": "Finalizar",
|
"finish": "Finalizar",
|
||||||
|
|
|
@ -496,7 +496,6 @@
|
||||||
"faq": "Preguntas frecuentes",
|
"faq": "Preguntas frecuentes",
|
||||||
"favourites": "Favoritos",
|
"favourites": "Favoritos",
|
||||||
"favourites-empty": "Las direcciones agregadas a favoritos aparecerán aquí",
|
"favourites-empty": "Las direcciones agregadas a favoritos aparecerán aquí",
|
||||||
"fetch-history": "Obtener las últimas 24 horas",
|
|
||||||
"fetch-messages": "↓ Recuperar mensajes",
|
"fetch-messages": "↓ Recuperar mensajes",
|
||||||
"find": "Encontrar",
|
"find": "Encontrar",
|
||||||
"finish": "Finalizar",
|
"finish": "Finalizar",
|
||||||
|
|
|
@ -520,7 +520,6 @@
|
||||||
"faq": "Mga madalas na tinatanong",
|
"faq": "Mga madalas na tinatanong",
|
||||||
"favourites": "Mga paborito",
|
"favourites": "Mga paborito",
|
||||||
"favourites-empty": "Lilitaw dito ang mga address na idinagdag sa mga paborito",
|
"favourites-empty": "Lilitaw dito ang mga address na idinagdag sa mga paborito",
|
||||||
"fetch-history": "Ang Fetch ay tatagal hanggang 24 na oras",
|
|
||||||
"fetch-messages": "↓ Kumuha ng mga mensahe",
|
"fetch-messages": "↓ Kumuha ng mga mensahe",
|
||||||
"find": "Maghanap",
|
"find": "Maghanap",
|
||||||
"finish": "Tapos na",
|
"finish": "Tapos na",
|
||||||
|
|
|
@ -496,7 +496,6 @@
|
||||||
"faq": "Foire aux questions",
|
"faq": "Foire aux questions",
|
||||||
"favourites": "Favoris",
|
"favourites": "Favoris",
|
||||||
"favourites-empty": "Les adresses ajoutées aux favoris apparaîtront ici",
|
"favourites-empty": "Les adresses ajoutées aux favoris apparaîtront ici",
|
||||||
"fetch-history": "Récupérer les dernières 24 heures",
|
|
||||||
"fetch-messages": "↓ Récupérer les messages",
|
"fetch-messages": "↓ Récupérer les messages",
|
||||||
"find": "Trouver",
|
"find": "Trouver",
|
||||||
"finish": "Finir",
|
"finish": "Finir",
|
||||||
|
|
|
@ -490,7 +490,6 @@
|
||||||
"faq": "Pertanyaan yang sering diajukan",
|
"faq": "Pertanyaan yang sering diajukan",
|
||||||
"favourites": "Favorit",
|
"favourites": "Favorit",
|
||||||
"favourites-empty": "Alamat yang ditambahkan ke favorit akan muncul di sini",
|
"favourites-empty": "Alamat yang ditambahkan ke favorit akan muncul di sini",
|
||||||
"fetch-history": "Ambil 24 jam terakhir",
|
|
||||||
"fetch-messages": "↓ Mengambil pesan",
|
"fetch-messages": "↓ Mengambil pesan",
|
||||||
"find": "Temukan",
|
"find": "Temukan",
|
||||||
"finish": "Selesai",
|
"finish": "Selesai",
|
||||||
|
|
|
@ -496,7 +496,6 @@
|
||||||
"faq": "Domande frequenti",
|
"faq": "Domande frequenti",
|
||||||
"favourites": "Preferiti",
|
"favourites": "Preferiti",
|
||||||
"favourites-empty": "Gli indirizzi aggiunti ai preferiti verranno visualizzati qui",
|
"favourites-empty": "Gli indirizzi aggiunti ai preferiti verranno visualizzati qui",
|
||||||
"fetch-history": "Recupera le ultime 24 ore",
|
|
||||||
"fetch-messages": "↓ Recupera messaggi",
|
"fetch-messages": "↓ Recupera messaggi",
|
||||||
"find": "Trova",
|
"find": "Trova",
|
||||||
"finish": "Finito",
|
"finish": "Finito",
|
||||||
|
|
|
@ -382,7 +382,6 @@
|
||||||
"export-account": "アカウントをエクスポート",
|
"export-account": "アカウントをエクスポート",
|
||||||
"failed": "失敗しました",
|
"failed": "失敗しました",
|
||||||
"faq": "よくある質問",
|
"faq": "よくある質問",
|
||||||
"fetch-history": "過去24時間の取得",
|
|
||||||
"fetch-messages": "↓メッセージを取得する",
|
"fetch-messages": "↓メッセージを取得する",
|
||||||
"find": "見つける",
|
"find": "見つける",
|
||||||
"finish": "完了",
|
"finish": "完了",
|
||||||
|
|
|
@ -490,7 +490,6 @@
|
||||||
"faq": "자주 묻는 질문",
|
"faq": "자주 묻는 질문",
|
||||||
"favourites": "즐겨 찾기",
|
"favourites": "즐겨 찾기",
|
||||||
"favourites-empty": "즐겨찾기에 추가 된 주소가 여기에 표시됩니다.",
|
"favourites-empty": "즐겨찾기에 추가 된 주소가 여기에 표시됩니다.",
|
||||||
"fetch-history": "지난 24시간 내역 불러오기",
|
|
||||||
"fetch-messages": "↓ 메시지 가져 오기",
|
"fetch-messages": "↓ 메시지 가져 오기",
|
||||||
"find": "찾기",
|
"find": "찾기",
|
||||||
"finish": "완료",
|
"finish": "완료",
|
||||||
|
|
|
@ -496,7 +496,6 @@
|
||||||
"faq": "Perguntas frequentes",
|
"faq": "Perguntas frequentes",
|
||||||
"favourites": "Favoritos",
|
"favourites": "Favoritos",
|
||||||
"favourites-empty": "Os endereços adicionados aos favoritos aparecerão aqui",
|
"favourites-empty": "Os endereços adicionados aos favoritos aparecerão aqui",
|
||||||
"fetch-history": "Buscar últimas 24 horas",
|
|
||||||
"fetch-messages": "↓ Buscar mensagens",
|
"fetch-messages": "↓ Buscar mensagens",
|
||||||
"find": "Encontrar",
|
"find": "Encontrar",
|
||||||
"finish": "Terminar",
|
"finish": "Terminar",
|
||||||
|
|
|
@ -496,7 +496,6 @@
|
||||||
"faq": "Perguntas frequentes",
|
"faq": "Perguntas frequentes",
|
||||||
"favourites": "Favoritos",
|
"favourites": "Favoritos",
|
||||||
"favourites-empty": "Os endereços adicionados aos favoritos aparecerão aqui",
|
"favourites-empty": "Os endereços adicionados aos favoritos aparecerão aqui",
|
||||||
"fetch-history": "Buscar últimas 24 horas",
|
|
||||||
"fetch-messages": "↓ Buscar mensagens",
|
"fetch-messages": "↓ Buscar mensagens",
|
||||||
"find": "Encontrar",
|
"find": "Encontrar",
|
||||||
"finish": "Terminar",
|
"finish": "Terminar",
|
||||||
|
|
|
@ -514,7 +514,6 @@
|
||||||
"faq": "Часто задаваемые вопросы",
|
"faq": "Часто задаваемые вопросы",
|
||||||
"favourites": "Избранное",
|
"favourites": "Избранное",
|
||||||
"favourites-empty": "Здесь будут отображены адреса, добавленные в избранное.",
|
"favourites-empty": "Здесь будут отображены адреса, добавленные в избранное.",
|
||||||
"fetch-history": "Получить сообщения за последние 24 часа",
|
|
||||||
"fetch-messages": "↓ Открыть сообщения",
|
"fetch-messages": "↓ Открыть сообщения",
|
||||||
"find": "Найти",
|
"find": "Найти",
|
||||||
"finish": "Закончить",
|
"finish": "Закончить",
|
||||||
|
|
|
@ -496,7 +496,6 @@
|
||||||
"faq": "Sıkça Sorulan Sorular",
|
"faq": "Sıkça Sorulan Sorular",
|
||||||
"favourites": "Favoriler",
|
"favourites": "Favoriler",
|
||||||
"favourites-empty": "Sık kullanılanlara eklenen adresler burada görünecek",
|
"favourites-empty": "Sık kullanılanlara eklenen adresler burada görünecek",
|
||||||
"fetch-history": "Son 24 saati getir",
|
|
||||||
"fetch-messages": "Mesajları getir",
|
"fetch-messages": "Mesajları getir",
|
||||||
"find": "Bul",
|
"find": "Bul",
|
||||||
"finish": "Bitti",
|
"finish": "Bitti",
|
||||||
|
|
|
@ -490,7 +490,6 @@
|
||||||
"faq": "常见问题",
|
"faq": "常见问题",
|
||||||
"favourites": "收藏夹",
|
"favourites": "收藏夹",
|
||||||
"favourites-empty": "添加到收藏夹的地址将显示在这里",
|
"favourites-empty": "添加到收藏夹的地址将显示在这里",
|
||||||
"fetch-history": "获取最近24小时的消息",
|
|
||||||
"fetch-messages": "↓获取消息",
|
"fetch-messages": "↓获取消息",
|
||||||
"find": "查找",
|
"find": "查找",
|
||||||
"finish": "完成",
|
"finish": "完成",
|
||||||
|
|
|
@ -392,7 +392,6 @@
|
||||||
"export-account": "导出帐户",
|
"export-account": "导出帐户",
|
||||||
"failed": "失败",
|
"failed": "失败",
|
||||||
"faq": "常见问题",
|
"faq": "常见问题",
|
||||||
"fetch-history": "获取最近24小时",
|
|
||||||
"fetch-messages": "↓获取消息",
|
"fetch-messages": "↓获取消息",
|
||||||
"find": "查找",
|
"find": "查找",
|
||||||
"finish": "完成",
|
"finish": "完成",
|
||||||
|
|
|
@ -490,7 +490,6 @@
|
||||||
"faq": "常見問題",
|
"faq": "常見問題",
|
||||||
"favourites": "收藏夾",
|
"favourites": "收藏夾",
|
||||||
"favourites-empty": "添加到收藏夾的地址將顯示在此處",
|
"favourites-empty": "添加到收藏夾的地址將顯示在此處",
|
||||||
"fetch-history": "過去24小時中",
|
|
||||||
"fetch-messages": "↓取得訊息",
|
"fetch-messages": "↓取得訊息",
|
||||||
"find": "搜尋",
|
"find": "搜尋",
|
||||||
"finish": "完成",
|
"finish": "完成",
|
||||||
|
|
|
@ -367,7 +367,6 @@
|
||||||
"export-account": "导出帐户",
|
"export-account": "导出帐户",
|
||||||
"failed": "失败",
|
"failed": "失败",
|
||||||
"faq": "常见问题",
|
"faq": "常见问题",
|
||||||
"fetch-history": "获取最近24小时",
|
|
||||||
"fetch-messages": "↓获取消息",
|
"fetch-messages": "↓获取消息",
|
||||||
"find": "查找",
|
"find": "查找",
|
||||||
"finishing-card-setup": "卡片设置完成",
|
"finishing-card-setup": "卡片设置完成",
|
||||||
|
|
Loading…
Reference in New Issue