Commit Graph

31 Commits

Author SHA1 Message Date
83ecc3142e Fix broken QR code scanner and fix landscape mode
Changelog-Fixed: Fix broken QR code scanner and fix landscape mode
2024-08-26 22:04:14 +03:00
William Casarin
e3642b92d1 txn: fix subtle transaction inheritence bugs
This fixes subtle bugs with transaction inheritence. Since we were not
passing the inherited state to moved value, we were sometimes committing
transactions more than once.

Changelog-Fixed: Fix many nostrdb transaction related crashes
2024-01-26 14:03:49 -08:00
William Casarin
bfad2ab42d ndb/txn: make transactions failable
Since there may be situations where we close and re-open the database,
we need to make sure transactions fail when the database is not open.

Make NdbTxn an init?() constructor and check for ndb.closed. If it's
closed, then fail transaction construction.

This fixes crashes during high database activity when switching from
background to foreground and vice-versa.

Fixes: da2bdad18d ("nostrdb: close database when backgrounded")
2024-01-10 14:27:02 -08:00
ericholguin
4dd800e6b9 ui: make qrcode view font color white
Currently when in light mode the font is black which blends into the background
Changelog-Fixed: use white font color in qrcode view

Closes: https://github.com/damus-io/damus/pull/1653
Reviewed-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-10-30 11:59:07 +09:00
William Casarin
69c7acea76 tests: add ndb support to tests
stops it from crashing
2023-09-21 09:10:06 -04:00
William Casarin
fc9b9f2940 ndb: switch profile queries to use transactions
this should ensure no crashing occurs when querying profiles
2023-09-21 09:10:06 -04:00
Suhail Saqan
29bba15230 qr: dismiss qrcode fullScreenCover on scan
Signed-off-by: William Casarin <jb55@jb55.com>
Changelog-Fixed: Dismiss qr screen on scan
2023-08-05 18:48:11 -07:00
Suhail Saqan
fb179ac1d4 qr: show QRCameraView regardless of same user
Signed-off-by: William Casarin <jb55@jb55.com>
Changelog-Fixed: Show QRCameraView regardless of same user
2023-08-05 18:48:11 -07:00
William Casarin
cebd1f48ca ndb: switch to nostrdb notes
This is a refactor of the codebase to use a more memory-efficient
representation of notes. It should also be much faster at decoding since
we're using a custom C json parser now.

Changelog-Changed: Improved memory usage and performance when processing events
2023-08-03 13:20:36 -07:00
William Casarin
7040235605 refactor: add Pubkey, Privkey, NoteId string aliases
This is a non-behavioral change in preparation for the actual switchover
from Strings to Ids. The purpose of this kit is to reduce the size of
the switchover commit which is going to be very large.
2023-07-31 05:38:19 -07:00
William Casarin
f9d21ef901 test: rename test_event to test_note 2023-07-31 05:38:19 -07:00
William Casarin
f702733654 nav: remove environmentObjects
environment objects are implicit arguments that cannot be checked by the
compiler. They are a common source of crashes. Use a main
NavigationCoordinator in DamusState for the core app, and pass in other
coordinators in the account setup view for the parts of the app that
don't have a DamusState.
2023-06-30 09:59:58 -07:00
Scott Penrose
69663b8207 A few more navigation links from rebase 2023-06-30 06:42:56 -07:00
ae9ae66b39 Fix spelling of Nostr to use Titlecase instead of lowercase
Changelog-Fixed: Fix spelling of Nostr to use Titlecase instead of lowercase
2023-06-10 11:42:25 +02:00
e7281fdacc Add missing localized string comment 2023-06-10 11:42:25 +02:00
William Casarin
8f237b47eb qrscan: use explicit types when scanning 2023-06-07 08:06:06 +02:00
William Casarin
3277aac220 refactor: use guard in qr profile lookup 2023-06-07 08:06:03 +02:00
William Casarin
e67dac13c6 refactor: use guard in handleProfileScan 2023-06-07 08:06:03 +02:00
Suhail Saqan
5f2c8223bd Add qr code scanner
Changelog-Added: Add qr code scanner
Closes: #733
2023-06-07 08:05:27 +02:00
Ben Weeks
973e9fe714 Custom iconography added for other areas of the app.
Changelog-Added: Custom iconography added for other areas of the app.
2023-05-29 14:47:05 -07:00
Ben Weeks
c22199165a Use "Follow me on nostr" text when looking at someone else's QR code
Fixes: #1069
Closes: #1199
Changelog-Fixed: Use "Follow me on nostr" text when looking at someone else's QR code
2023-05-29 12:27:07 -07:00
Bryan Montz
9847f12c95 Remove unused code
Closes: #1105
2023-05-08 11:01:04 -07:00
William Casarin
357e8adf86 Refactor disable_animation setting
Pass it down from the top instead of using a function which goes around
our settings store
2023-04-22 12:08:24 -07:00
William Casarin
bad6ba3643 qrcode: don't default pubkey to "" 2023-04-14 09:23:14 -07:00
ericholguin
5c131e62d7 Add QR Code in profiles
Changelog-Added: Add QR Code in profiles
Closes: #918
2023-04-14 09:20:10 -07:00
William Casarin
eabf37e35c Refactor damus color references 2023-03-27 12:39:38 -04:00
4406e44424 Export translations 2023-02-07 00:02:26 -05:00
William Casarin
ba8425dedb Revert "Add remote image loading policy settings"
We still want to blur images from stranges if we set the everyone
policy. This is a regression.

This reverts commit ced5b4974f, reversing
changes made to 9be55b08fd.
2023-02-05 00:24:03 -08:00
William Casarin
cfcd799d63 Fix build 2023-02-04 12:23:24 -08:00
ericholguin
99b619e011 Updated QR Code view, include profile image, name, and remove pubkey text
Closes: #443
Changelog-Changed: Updated QR code view, include profile image, etc
2023-02-04 12:11:20 -08:00
ericholguin
e4beb872a5 Add QRCode view
Changelog-Added: Add QRCode view for sharing your pubkey
Closes: #418
2023-01-28 08:36:53 -08:00