Commit Graph

21 Commits

Author SHA1 Message Date
Daniel D’Aquino
ad75d8546c Add experimental push notification support
I added support for the experimental push notifications feature. There are many improvements to be made, so this feature is currently opt-in only. If the user does not opt-in, their device tokens will not be sent out and thus they will receive no push notifications.

We should perform more testing on real-life staging environments before fully releasing this feature.

Testing
-------

Testing was done gradually during development.

Device: iOS simulators
iOS: 17
Damus version: A few different but recent prototypes
Rough coverage:
1. Checked that no device tokens are sent out when setting is off
2. Checked that I can successfully receive device tokens when feature is ON and set to localhost.
3. Checked sending test push notifications of types "note" (kind: 1), reaction (kind: 7) and DMs (kind 4) works and shows a generic but reasonable push notification message
4. Checked that clicking on the notifications above take the user to the correct screen

Closes: https://github.com/damus-io/damus/issues/67
Changelog-Added: Add experimental push notification support
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-11-20 10:32:33 -08:00
Jericho Hasselbush
439f9974c5 login: add nsec qr-scanning
- Allow scanning of QR codes, and if detects a nsec, will provide it to
  the login prompt.

- If nsec is found, provides option to keep nsec in keychain; default is
  to not store

- User stays logged in until they logout, or app is force-quit if nsec
  is not stored.

damusApp.swift:
  Obtains keypair from the notification generated to allow login.

LoginView.swift:
  New views allowing for adding and logic handling the QR reader in
  QRScanNSECView.swift to enable QR scan for nsec.

QRScanNSECView.swift:
  New view to scan for QR code. The sparkling magnifying glass is enabled
  if the view calling the QR view changes the privKeyFound bound variable.

Tipjar: npub1el277q4kesp8vhs7rq6qkwnhpxfp345u7tnuxykwr67d9wg0wvyslam5n0
Closes: https://github.com/damus-io/damus/issues/1291
Changelog-Added: Add QR scan nsec logins.
Signed-off-by: Jericho Hasselbush <jericho@sal-et-lucem.com>
Reviewed-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-10-16 03:12:53 +02:00
gladiusKatana
5caa4a6e97 videos: improve precision & sensitivity of auto-pause mechanism
Closes: https://github.com/damus-io/damus/pull/1308
Signed-off-by: William Casarin <jb55@jb55.com>
2023-08-23 09:24:13 -07:00
William Casarin
624a7b4e88 notifications: fix rare crash with local notification
This shouldn't happen, but I found a log that crashed here, so we will
fix this anyways.

Changelog-Fixed: Fix rare crash triggered by local notifications
2023-08-06 08:33:51 -07:00
William Casarin
b40c595a7c notify: switch over to new typesafe notifications 2023-07-30 11:02:44 -07:00
Bryan Montz
9847f12c95 Remove unused code
Closes: #1105
2023-05-08 11:01:04 -07:00
Swift
05d332eac3 Add deep links for local notifications
Allow notifications to be clickable

Changelog-Added: Add deep links for local notifications
Co-authored-by: William Casarin <jb55@jb55.com>
Closes: #880
2023-04-15 12:41:49 -07:00
35ee2f5744 Replace deprecated UNNotificationPresentationOptions.alert with .banner and .list
Closes: #844
2023-03-31 09:07:51 -07:00
Swift
b773df1204 Local Zap Notifications
Changelog-Added: Local zap notifications
2023-03-27 15:50:00 -04:00
OlegAba
0bdec912f8 Restrict dynamic font type - max size 2023-02-18 09:34:50 -08:00
William Casarin
10596ddb09 Relay Filters
wip
2023-02-09 14:23:18 -08:00
Ben Weeks
fba29d4454 Worked on amending the colors. 2023-01-06 22:41:48 +00:00
William Casarin
7372c4847d perf: cache link previews
Changelog-Added: Cache link previews
2023-01-02 15:19:57 -08:00
Thomas Rademaker
6a8100152f save the private key to the keychain and not user defaults 2022-12-22 18:13:33 -05:00
William Casarin
f522fc79df logout: clear keypair on logout
Fixes: #12
Reported-by: Jeff Thibault (github:jeffthibault)
Changelog-Fixed: Logging out now resets your keypair and actually logs out
Signed-off-by: William Casarin <jb55@jb55.com>
2022-07-28 13:11:51 -07:00
William Casarin
a417da6089 Add logout button, and show account keys
Changelog-Added: Show logout button and account keys in config
Signed-off-by: William Casarin <jb55@jb55.com>
2022-06-18 10:35:46 -07:00
William Casarin
8aac880bb5 more filters
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-24 14:34:21 -07:00
William Casarin
097cc54bba extract HomeModel from ContentView
huge refactor

Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-24 12:57:40 -07:00
William Casarin
2920325639 initial CreateAccountView
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-21 19:44:04 -07:00
William Casarin
084d699cfc Initial SetupView
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-19 14:38:25 -07:00
William Casarin
f4bb07081f initial commit
Signed-off-by: William Casarin <jb55@jb55.com>
2022-04-02 16:57:42 -07:00