Commit Graph

136 Commits

Author SHA1 Message Date
Gheorghe Pinzaru d823a2082a
Update react navigation and rework wrapper
Get rid of navigation wrapper

Use new API to declare navigation

Update tabbar component

Update to use new navigation events

Add ios presentation modal

Navigation cleanups

Android specific updates

Use letsubs for stack subscriptions

Keycard did load event backward compatibility

Fix tabbar and wallet on-focus bad rebase

Do not keep welcome screen into the stack

Comment outdated test

Fix rebase on home PR

Cancel back button on screens which can't be popped

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-03-17 11:52:31 +03:00
Andrea Maria Piana 5da861d91f
remove transit
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2020-01-15 17:26:42 +01:00
Roman Volosovskyi beed1a60ee
[#9573] Fix some password saving bugs 2019-12-11 12:15:25 +02:00
Andrea Maria Piana c69863cda2
Fix message ordering and improve performance rec. messages
This commit does a few things:

==== Ordering of messages ====

Change the ordering of messages from a mixture of timestamp/clock-value to use
only clock-value.

Datemarks are now not used for sorting anymore, which means that the
order of messages is always causally related (not the case before, as we
were breaking this property by sorting by datemark), but datemark
calculation is unreliable (a reply to a message might have a timestamp <
then the message that is replied to).
So for timestamp calculation we
naively group them ignoring "out-of-order timestamp" messages, although
there's much to improve.
It fixes an issue whereby the user would change their time and the
message will be displayed in the past, although it is still possible to
craft a message with a lower clock value and order it in the past
(there's no way we can prevent this to some extent, but there are ways
to mitigate, but outside the scope of this PR).

==== Performance of receiving messages ====

The app would freeze on pulling messages from a mailserver (100 or so).
This is due to the JS Thread being hogged by CPU calculation, coupled
with the fact that we always tried to process messages all in one go.

This strategy can't scale, and given x is big enough (200,300,1000) the
UI will freeze.

Instead, each message is now processed separately, and we leave a gap
between processing each message for the UI to respond to user input
(otherwise the app freezes again).
Pulling messages will be longer overall, but the app will be usuable
while this happen (albeit it might slow down).
Other strategies are possible (calculate off-db and do a big swap,
avoiding many re-renders etc), but this is the reccommended strategy by
re-frame author (Solving the CPU Hog problem), so sounds like a safe
base point.

The underlying data structure for holding messages was also changed, we
used an immutable Red and Black Tree, same as a sorted map for clojure, but we use
a js library as is twice as performing then clojure sorted map.

We also don't sort messages again each time we receive them O(nlogn), but we
insert them in order O(logn).

Other data structures considered but discarded:
1) Plain vector, but performance prepending/insertion in the middle
(both O(n)) were not great, as not really suited for these operations.

2) Linked list, appealing as append/prepend is O(1), while insertion is
O(n). This is probably acceptable as messages tend to come in order
(from the db, so adding N messages is O(n)), or the network (most of
them prepends, or close to the head), while mailserver would not follow this path.
An implementation of a linked list was built, which performed roughtly the
same as a clojure sorted-map (although faster append/prepend), but not
worth the complexity of having our own implementation.

3) Clojure sorted-map, probably the most versatile, performance were
acceptable, but nowhere near the javascript implementation we decided on

4) Priority map, much slower than a sorted map (twice as slow)

5) Mutable sorted map, js implementation, (bintrees), not explored this very much, but from
just a quick benchmark, performance were much worse that clojure
immutable sorted map

Given that each message is now processed separately, saving the chat /
messages is also debounced to avoid spamming status-go with network
requests. This is a temporary measure for now until that's done directly
in status-go, without having to ping-pong with status-react.

Next steps performance wise is to move stuff to status-go, parsing of
transit, validation, which is heavy, at which point we can re-consider
performance and how to handle messages.

Fixes also an issue with the last message in the chat, we were using the
last message in the chat list, which might not necessarely be the last
message the chat has seen, in case messages were not loaded and a more
recent message is the database (say you fetch historical messages for
1-to-1 A, you don't have any messages in 1-to-1 chat B loaded, you receive an
historical message for chat B, it sets it as last message).

Also use clj beans instead of js->clj for type conversion

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-11-01 23:59:26 +01:00
yenda d4a396bedf
move networks out of multiaccount 2019-08-28 11:11:40 +02:00
yenda d61fffb021
remove dev-server and extensions for v1 2019-08-20 17:42:02 +02:00
bitsikka 39e095e1ed
[8069] feature - [Profile] My profile edit and share screens
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-08-19 11:09:38 +03:00
Jakub Sokołowski 2acd5b4cb0
rename prod-build to jsbundle so it means something
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-07-24 11:56:03 -04:00
Pedro Pombeiro a7fd659d84
nix: Wrap gradle, npm packages, `lein prod-build` and `gradle assembleRelease` in Nix expressions to improve reproducible builds with constant build paths 2019-07-15 16:08:02 +02:00
Pedro Pombeiro c051efb508
Use forked com.taoensso/timbre for deterministic builds 2019-07-15 16:08:01 +02:00
Roman Volosovskyi 7097de6e05
[perf] extensions module 2019-06-13 09:35:09 +03:00
Roman Volosovskyi 908f730b1d
[perf] network module 2019-06-13 09:33:18 +03:00
Roman Volosovskyi 3bd0947b4c
[perf] move goog.i18n deps to a module 2019-06-10 21:10:42 +03:00
Roman Volosovskyi cdae3423bc
[perf] Minimize com.taoensso/timbre dependencies 2019-06-09 07:56:51 +03:00
Pedro Pombeiro 1457f0f017
Some changes from the node2nix test branch that don't need to be there
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-06-06 19:13:31 +02:00
Roman Volosovskyi 632bbf3bc1
[perf] Move translation to node_modules in release build 2019-06-05 18:40:53 +03:00
Roman Volosovskyi daacccb512
[Android, iOS] Advanced ClojureScript compilation 2019-05-30 21:23:31 +03:00
yenda fa18f3b746
updating dev dependencies
Signed-off-by: yenda <eric@status.im>
2019-04-25 16:18:17 +02:00
Julien Eluard 1bfa3cf178
Upgraded to latest pluto
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2019-03-28 15:48:44 +01:00
Julien Eluard 38570aa42f
Migrated to latest pluto release
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-03-19 12:55:15 +01:00
Julien Eluard dd9933cfec
Moved to new pluto release
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2019-01-21 15:05:14 +01:00
Julien Eluard 5db9aa9ac7
Reintroduced broken PR #7092 with fix
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
2018-12-21 14:55:32 +01:00
Igor Mandrigin 794313dbee
Revert "[Fixes #7052 and #7037] Improved extensions ethereum support"
This reverts commit 6a8c9bf14f.

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
2018-12-21 13:50:42 +01:00
Julien Eluard 6a8c9bf14f
[Fixes #7052 and #7037] Improved extensions ethereum support
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2018-12-21 13:11:00 +01:00
Andrey Shovkoplyas 582c2960ec
[#6644] Chat command recipients should be able to install an extension
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2018-11-29 16:43:15 +01:00
Andrey Shovkoplyas 028ab522b9
[#6867] Add on-send-sync to chat.command extension
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2018-11-27 21:23:20 +01:00
Julien Eluard a20f3ec546
[Fixes #6800] Introduce picker componenet (and expose activity-loading,
list)

Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2018-11-26 15:04:07 +01:00
Julien Eluard 529eabb1f4
[Fixes #6739] Introduced wallet.settings hook
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2018-11-20 18:04:25 +01:00
yenda b41df3b3c2
updating cljs compiler
Signed-off-by: yenda <eric@status.im>
2018-11-16 13:10:31 +01:00
Julien Eluard ca7b4f1b74
Moved to fixed pluto version
Signed-off-by: yenda <eric@status.im>
2018-11-14 15:02:34 +01:00
Julien Eluard 009d974d83
Improved extensions error handling. Various fixes.
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2018-11-09 09:42:23 +01:00
Julien Eluard c857eb5357
Added disclaimer for extensions
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2018-10-19 16:35:12 +02:00
Julien Eluard 00ed5bc883
Moved to newer pluto
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2018-10-12 10:17:27 +02:00
yenda c2f8965f02
update piggieback
Signed-off-by: yenda <eric@status.im>
2018-10-10 19:55:48 +02:00
Roman Volosovskyi 6438a1387b
[#4866] intagrate react-navigation 2018-09-18 14:21:32 +03:00
Eric Dvorsak ccbc0baffb
update developer dependencies
Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-09-17 10:31:30 +02:00
Andrey Shovkoplyas c96bc5aa8b
[#4772] Resolve ENS domains in browser
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2018-09-03 11:47:26 +03:00
Julien Eluard ae976e205f
Added extensions loading panel
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2018-08-31 16:41:58 +02:00
Volodymyr Kozieiev 457f2a157a
Desktop branch merged into develop (#5266)
* Desktop branch merged into develop
* Fixed review notes by yenda
2018-07-23 18:21:31 +03:00
Andrea Maria Piana e564de6bd0
Update docker build to latest sdk
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-07-11 18:18:17 +02:00
Goran Jovic 1f4f913ac6
adds a filter to pre-commit hook to prevent analysis of deleted files
Signed-off-by: Goran Jovic <goranjovic@gmail.com>
2018-05-31 12:23:28 +02:00
Roman Volosovskyi 08ae404980
check formatting only in changed files in pre-commit hook 2018-05-30 10:47:21 +03:00
Eric Dvorsak 50072ffe3f
[fix 4177] handle discovery signals
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2018-05-23 17:01:57 +02:00
Roman Volosovskyi 8f1c9521ba
add cljfmt to project;
add pre-push hook;
add cljfmt to Jenkinsfile;
2018-05-09 07:16:06 +03:00
Eric Dvorsak f8e535f9bc
[fix 3843] query mailserver when going back online
Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-05-03 22:40:59 +02:00
Eric Dvorsak ac2d622127
fix deps.edn and project.clj version diff
Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
2018-05-01 19:17:01 +02:00
Stepan Lusnikov 441a3858d9
Use :npm-deps false
Signed-off-by: Dmitry Novotochinov <trybeee@gmail.com>
2018-05-01 14:42:18 +03:00
Andrey Shovkoplyas f60025b879 added mixpanel events for 2018-04-20 17:18:09 +03:00
Dmitry Novotochinov 811e73d34b
Integrate re-frame-10x for tracing/debugging
- Update re-frisk-remote and re-frisk-sidecar
- Use re-frame 0.10.5 as required by re-frame-10x
- Enable re-frame tracing by adding hack to figwheel-bridge.js as there is no :closure-defines support in RN yet

Signed-off-by: Dmitry Novotochinov <trybeee@gmail.com>
2018-04-19 18:11:28 +03:00
Andrea Maria Piana f8e73f8538
Add docker integration tests
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2018-04-10 09:44:22 +01:00