Compare commits
19 Commits
web-of-tru
...
hidden-lin
| Author | SHA1 | Date | |
|---|---|---|---|
|
a8b6b5f10e
|
|||
|
1bedb6b2bd
|
|||
|
|
8d9f728cf0 | ||
| 2c62741e25 | |||
|
|
1f612f7fde | ||
|
|
0e9e102d0f | ||
|
|
b94e8765a1 | ||
|
|
53964f5c1a | ||
| bd574d93c3 | |||
| 47514ace79 | |||
|
|
298b43733f | ||
|
|
02116c0af5 | ||
| 92121e3b2d | |||
|
|
c92094823e | ||
|
|
f4b1a504a5 | ||
| 99ae7de5eb | |||
| b3d9ee3fc0 | |||
| e65219ee3e | |||
|
|
414c67a919 |
@@ -427,11 +427,26 @@
|
||||
5C0567592C8FBDE30073F23A /* Router.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2277EE92A089BD5006C3807 /* Router.swift */; };
|
||||
5C05675A2C8FBDE70073F23A /* NDBSearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C0567572C8FBC560073F23A /* NDBSearchView.swift */; };
|
||||
5C0707D12A1ECB38004E7B51 /* DamusLogoGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C0707D02A1ECB38004E7B51 /* DamusLogoGradient.swift */; };
|
||||
5C09FD122DF283D700823661 /* FollowPackModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C09FD112DF283D200823661 /* FollowPackModel.swift */; };
|
||||
5C09FD132DF283D700823661 /* FollowPackModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C09FD112DF283D200823661 /* FollowPackModel.swift */; };
|
||||
5C09FD142DF283D700823661 /* FollowPackModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C09FD112DF283D200823661 /* FollowPackModel.swift */; };
|
||||
5C14C29B2BBBA29C00079FD2 /* RelaySoftwareDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C14C29A2BBBA29C00079FD2 /* RelaySoftwareDetail.swift */; };
|
||||
5C14C29D2BBBA40B00079FD2 /* RelayAdminDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C14C29C2BBBA40B00079FD2 /* RelayAdminDetail.swift */; };
|
||||
5C14C29F2BBBA5C600079FD2 /* RelayNipList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C14C29E2BBBA5C600079FD2 /* RelayNipList.swift */; };
|
||||
5C42E78C29DB76D90086AAC1 /* EmptyUserSearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C42E78B29DB76D90086AAC1 /* EmptyUserSearchView.swift */; };
|
||||
5C4D9EA72C042FA5005EA0F7 /* HighlightDraftContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4D9EA62C042FA5005EA0F7 /* HighlightDraftContentView.swift */; };
|
||||
5C4FA7EC2DC29AE900CE658C /* FollowPackEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4FA7EB2DC29AE900CE658C /* FollowPackEvent.swift */; };
|
||||
5C4FA7ED2DC29AE900CE658C /* FollowPackEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4FA7EB2DC29AE900CE658C /* FollowPackEvent.swift */; };
|
||||
5C4FA7EE2DC29AE900CE658C /* FollowPackEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4FA7EB2DC29AE900CE658C /* FollowPackEvent.swift */; };
|
||||
5C4FA7FB2DC29C3800CE658C /* FollowPackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4FA7F92DC29C3800CE658C /* FollowPackView.swift */; };
|
||||
5C4FA7FC2DC29C3800CE658C /* FollowPackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4FA7F92DC29C3800CE658C /* FollowPackView.swift */; };
|
||||
5C4FA7FD2DC29C3800CE658C /* FollowPackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4FA7F92DC29C3800CE658C /* FollowPackView.swift */; };
|
||||
5C4FA7FF2DC5119300CE658C /* FollowPackPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4FA7FE2DC5119300CE658C /* FollowPackPreview.swift */; };
|
||||
5C4FA8002DC5119300CE658C /* FollowPackPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4FA7FE2DC5119300CE658C /* FollowPackPreview.swift */; };
|
||||
5C4FA8012DC5119300CE658C /* FollowPackPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4FA7FE2DC5119300CE658C /* FollowPackPreview.swift */; };
|
||||
5C4FA8032DCAF80E00CE658C /* FollowPackTimeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4FA8022DCAF80400CE658C /* FollowPackTimeline.swift */; };
|
||||
5C4FA8042DCAF80E00CE658C /* FollowPackTimeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4FA8022DCAF80400CE658C /* FollowPackTimeline.swift */; };
|
||||
5C4FA8052DCAF80E00CE658C /* FollowPackTimeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4FA8022DCAF80400CE658C /* FollowPackTimeline.swift */; };
|
||||
5C513FBA297F72980072348F /* CustomPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C513FB9297F72980072348F /* CustomPicker.swift */; };
|
||||
5C513FCC2984ACA60072348F /* QRCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C513FCB2984ACA60072348F /* QRCodeView.swift */; };
|
||||
5C6E1DAD2A193EC2008FC15A /* GradientButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C6E1DAC2A193EC2008FC15A /* GradientButtonStyle.swift */; };
|
||||
@@ -1575,6 +1590,9 @@
|
||||
D7A0D8752D1FE67900DCBE59 /* EditPictureControlTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A0D8742D1FE66A00DCBE59 /* EditPictureControlTests.swift */; };
|
||||
D7A343EE2AD0D77C00CED48B /* InlineSnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = D7A343ED2AD0D77C00CED48B /* InlineSnapshotTesting */; };
|
||||
D7A343F02AD0D77C00CED48B /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = D7A343EF2AD0D77C00CED48B /* SnapshotTesting */; };
|
||||
D7AACFFF2E0387B800FB7699 /* LnurlAmountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7AACFFE2E0387B800FB7699 /* LnurlAmountView.swift */; };
|
||||
D7AAD0002E0387B800FB7699 /* LnurlAmountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7AACFFE2E0387B800FB7699 /* LnurlAmountView.swift */; };
|
||||
D7AAD0012E0387B800FB7699 /* LnurlAmountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7AACFFE2E0387B800FB7699 /* LnurlAmountView.swift */; };
|
||||
D7ADD3DE2B53854300F104C4 /* DamusPurpleURL.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7ADD3DD2B53854300F104C4 /* DamusPurpleURL.swift */; };
|
||||
D7ADD3E02B538D4200F104C4 /* DamusPurpleURLSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7ADD3DF2B538D4200F104C4 /* DamusPurpleURLSheetView.swift */; };
|
||||
D7ADD3E22B538E3500F104C4 /* DamusPurpleVerifyNpubView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7ADD3E12B538E3500F104C4 /* DamusPurpleVerifyNpubView.swift */; };
|
||||
@@ -1705,6 +1723,9 @@
|
||||
D7DB930C2D69486700DA1EE5 /* NIP65.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DB93092D69485A00DA1EE5 /* NIP65.swift */; };
|
||||
D7DBD41F2B02F15E002A6197 /* NostrKind.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3BEFD32819DE8F00B3DE84 /* NostrKind.swift */; };
|
||||
D7DEEF2F2A8C021E00E0C99F /* NostrEventTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DEEF2E2A8C021E00E0C99F /* NostrEventTests.swift */; };
|
||||
D7DF58322DFCF18D00E9AD28 /* SendPaymentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DF58312DFCF18800E9AD28 /* SendPaymentView.swift */; };
|
||||
D7DF58332DFCF18D00E9AD28 /* SendPaymentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DF58312DFCF18800E9AD28 /* SendPaymentView.swift */; };
|
||||
D7DF58342DFCF18D00E9AD28 /* SendPaymentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DF58312DFCF18800E9AD28 /* SendPaymentView.swift */; };
|
||||
D7EB00B02CD59C8D00660C07 /* PresentFullScreenItemNotify.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7EB00AF2CD59C8300660C07 /* PresentFullScreenItemNotify.swift */; };
|
||||
D7EB00B12CD59C8D00660C07 /* PresentFullScreenItemNotify.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7EB00AF2CD59C8300660C07 /* PresentFullScreenItemNotify.swift */; };
|
||||
D7EDED152B11776B0018B19C /* LibreTranslateServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE45AF5297BB2E700C1D842 /* LibreTranslateServer.swift */; };
|
||||
@@ -2449,11 +2470,16 @@
|
||||
5C0567542C8B60C20073F23A /* OffsetExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffsetExtension.swift; sourceTree = "<group>"; };
|
||||
5C0567572C8FBC560073F23A /* NDBSearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NDBSearchView.swift; sourceTree = "<group>"; };
|
||||
5C0707D02A1ECB38004E7B51 /* DamusLogoGradient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DamusLogoGradient.swift; sourceTree = "<group>"; };
|
||||
5C09FD112DF283D200823661 /* FollowPackModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FollowPackModel.swift; sourceTree = "<group>"; };
|
||||
5C14C29A2BBBA29C00079FD2 /* RelaySoftwareDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelaySoftwareDetail.swift; sourceTree = "<group>"; };
|
||||
5C14C29C2BBBA40B00079FD2 /* RelayAdminDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayAdminDetail.swift; sourceTree = "<group>"; };
|
||||
5C14C29E2BBBA5C600079FD2 /* RelayNipList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayNipList.swift; sourceTree = "<group>"; };
|
||||
5C42E78B29DB76D90086AAC1 /* EmptyUserSearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyUserSearchView.swift; sourceTree = "<group>"; };
|
||||
5C4D9EA62C042FA5005EA0F7 /* HighlightDraftContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HighlightDraftContentView.swift; sourceTree = "<group>"; };
|
||||
5C4FA7EB2DC29AE900CE658C /* FollowPackEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FollowPackEvent.swift; sourceTree = "<group>"; };
|
||||
5C4FA7F92DC29C3800CE658C /* FollowPackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FollowPackView.swift; sourceTree = "<group>"; };
|
||||
5C4FA7FE2DC5119300CE658C /* FollowPackPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FollowPackPreview.swift; sourceTree = "<group>"; };
|
||||
5C4FA8022DCAF80400CE658C /* FollowPackTimeline.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FollowPackTimeline.swift; sourceTree = "<group>"; };
|
||||
5C513FB9297F72980072348F /* CustomPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomPicker.swift; sourceTree = "<group>"; };
|
||||
5C513FCB2984ACA60072348F /* QRCodeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRCodeView.swift; sourceTree = "<group>"; };
|
||||
5C6E1DAC2A193EC2008FC15A /* GradientButtonStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientButtonStyle.swift; sourceTree = "<group>"; };
|
||||
@@ -2589,6 +2615,7 @@
|
||||
D79C4C182AFEB061003A41B4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D79C4C1C2AFEB061003A41B4 /* DamusNotificationService.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DamusNotificationService.entitlements; sourceTree = "<group>"; };
|
||||
D7A0D8742D1FE66A00DCBE59 /* EditPictureControlTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditPictureControlTests.swift; sourceTree = "<group>"; };
|
||||
D7AACFFE2E0387B800FB7699 /* LnurlAmountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LnurlAmountView.swift; sourceTree = "<group>"; };
|
||||
D7ADD3DD2B53854300F104C4 /* DamusPurpleURL.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DamusPurpleURL.swift; sourceTree = "<group>"; };
|
||||
D7ADD3DF2B538D4200F104C4 /* DamusPurpleURLSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DamusPurpleURLSheetView.swift; sourceTree = "<group>"; };
|
||||
D7ADD3E12B538E3500F104C4 /* DamusPurpleVerifyNpubView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DamusPurpleVerifyNpubView.swift; sourceTree = "<group>"; };
|
||||
@@ -2613,6 +2640,7 @@
|
||||
D7DB93042D66A43B00DA1EE5 /* Undistractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Undistractor.swift; sourceTree = "<group>"; };
|
||||
D7DB93092D69485A00DA1EE5 /* NIP65.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NIP65.swift; sourceTree = "<group>"; };
|
||||
D7DEEF2E2A8C021E00E0C99F /* NostrEventTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NostrEventTests.swift; sourceTree = "<group>"; };
|
||||
D7DF58312DFCF18800E9AD28 /* SendPaymentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendPaymentView.swift; sourceTree = "<group>"; };
|
||||
D7EB00AF2CD59C8300660C07 /* PresentFullScreenItemNotify.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PresentFullScreenItemNotify.swift; sourceTree = "<group>"; };
|
||||
D7EDED1B2B1178FE0018B19C /* NoteContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoteContent.swift; sourceTree = "<group>"; };
|
||||
D7EDED1D2B11797D0018B19C /* LongformEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LongformEvent.swift; sourceTree = "<group>"; };
|
||||
@@ -2830,6 +2858,8 @@
|
||||
4C0A3F8D280F63FF000448DE /* Models */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5C09FD112DF283D200823661 /* FollowPackModel.swift */,
|
||||
5C4FA7EB2DC29AE900CE658C /* FollowPackEvent.swift */,
|
||||
D73BDB122D71212600D69970 /* NostrNetworkManager */,
|
||||
D74F43082B23F09300425B75 /* Purple */,
|
||||
BA3759882ABCCDE30018D73B /* Camera */,
|
||||
@@ -3348,6 +3378,8 @@
|
||||
4C7D095A2A098C5C00943473 /* Wallet */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D7AACFFE2E0387B800FB7699 /* LnurlAmountView.swift */,
|
||||
D7DF58312DFCF18800E9AD28 /* SendPaymentView.swift */,
|
||||
5C8498012D5D14FA00F74FEB /* ZapExplainer.swift */,
|
||||
5CB017302D4422D600A9ED05 /* NWCSettings.swift */,
|
||||
5CB0172C2D42C76600A9ED05 /* BalanceView.swift */,
|
||||
@@ -3637,6 +3669,7 @@
|
||||
4CC7AAEE297F11B300430951 /* Events */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5C4FA7FA2DC29C3800CE658C /* FollowPack */,
|
||||
5CC852A02BDED9970039FFC5 /* Highlight */,
|
||||
4CA927682A290F8F0098A105 /* Components */,
|
||||
4CC7AAEF297F11C700430951 /* SelectedEventView.swift */,
|
||||
@@ -3952,6 +3985,16 @@
|
||||
path = Images;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5C4FA7FA2DC29C3800CE658C /* FollowPack */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5C4FA8022DCAF80400CE658C /* FollowPackTimeline.swift */,
|
||||
5C4FA7FE2DC5119300CE658C /* FollowPackPreview.swift */,
|
||||
5C4FA7F92DC29C3800CE658C /* FollowPackView.swift */,
|
||||
);
|
||||
path = FollowPack;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5CC852A02BDED9970039FFC5 /* Highlight */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -4659,6 +4702,7 @@
|
||||
4C363A9028247A1D006E126D /* NostrLink.swift in Sources */,
|
||||
4C3D52B6298DB4E6001C5831 /* ZapEvent.swift in Sources */,
|
||||
647D9A8D2968520300A295DE /* SideMenuView.swift in Sources */,
|
||||
D7AAD0012E0387B800FB7699 /* LnurlAmountView.swift in Sources */,
|
||||
F7F0BA272978E54D009531F3 /* ParticipantsView.swift in Sources */,
|
||||
4CF0ABE32981BC7D00D66079 /* UserView.swift in Sources */,
|
||||
4CE0E2AF29A2E82100DB4CA2 /* EventHolder.swift in Sources */,
|
||||
@@ -4678,6 +4722,7 @@
|
||||
BA3759972ABCCF360018D73B /* CameraPreview.swift in Sources */,
|
||||
4C75EFA627FF87A20006080F /* Nostr.swift in Sources */,
|
||||
4CA927672A290F8B0098A105 /* RelativeTime.swift in Sources */,
|
||||
5C4FA8032DCAF80E00CE658C /* FollowPackTimeline.swift in Sources */,
|
||||
4CB883A62975F83C00DC99E7 /* LNUrlPayRequest.swift in Sources */,
|
||||
D7CB5D4B2B11721600AD4105 /* ZapType.swift in Sources */,
|
||||
4CE4F9DE2852768D00C00DD9 /* ConfigView.swift in Sources */,
|
||||
@@ -4823,6 +4868,7 @@
|
||||
4C64987E286D082C00EAE2B3 /* DirectMessagesModel.swift in Sources */,
|
||||
4C12535E2A76CA870004F4B8 /* SwitchedTimelineNotify.swift in Sources */,
|
||||
D74F430A2B23F0BE00425B75 /* DamusPurple.swift in Sources */,
|
||||
5C4FA7ED2DC29AE900CE658C /* FollowPackEvent.swift in Sources */,
|
||||
9CA876E229A00CEA0003B9A3 /* AttachMediaUtility.swift in Sources */,
|
||||
3ACF94462DAA006500971A4E /* NIP05DomainEventsModel.swift in Sources */,
|
||||
D734B1452CCC19B1000B5C97 /* DamusFullScreenCover.swift in Sources */,
|
||||
@@ -4905,6 +4951,7 @@
|
||||
D7373BAA2B68A65A00F7783D /* PurpleAccountUpdateNotify.swift in Sources */,
|
||||
5C6E1DAD2A193EC2008FC15A /* GradientButtonStyle.swift in Sources */,
|
||||
3CCD1E6A2A874C4E0099A953 /* Nip98HTTPAuth.swift in Sources */,
|
||||
5C4FA7FF2DC5119300CE658C /* FollowPackPreview.swift in Sources */,
|
||||
4C8EC52529D1FA6C0085D9A8 /* DamusColors.swift in Sources */,
|
||||
3A4647CF2A413ADC00386AD8 /* CondensedProfilePicturesView.swift in Sources */,
|
||||
5C14C29B2BBBA29C00079FD2 /* RelaySoftwareDetail.swift in Sources */,
|
||||
@@ -4935,6 +4982,7 @@
|
||||
3165648B295B70D500C64604 /* LinkView.swift in Sources */,
|
||||
4C8D00CF29E38B950036AF10 /* nostr_bech32.c in Sources */,
|
||||
D7CB5D5C2B1176B200AD4105 /* MediaUploader.swift in Sources */,
|
||||
5C4FA7FD2DC29C3800CE658C /* FollowPackView.swift in Sources */,
|
||||
4C1253562A76C8C60004F4B8 /* BroadcastNotify.swift in Sources */,
|
||||
4C3BEFD42819DE8F00B3DE84 /* NostrKind.swift in Sources */,
|
||||
B533694E2B66D791008A805E /* MutelistManager.swift in Sources */,
|
||||
@@ -4962,6 +5010,7 @@
|
||||
4C3AC7A728369BA200E1F516 /* SearchHomeView.swift in Sources */,
|
||||
E0EE9DD42B8E5FEA00F3002D /* ImageProcessing.swift in Sources */,
|
||||
4CB883B0297705DD00DC99E7 /* NoteZapButton.swift in Sources */,
|
||||
D7DF58342DFCF18D00E9AD28 /* SendPaymentView.swift in Sources */,
|
||||
4C363A922825FCF2006E126D /* ProfileUpdate.swift in Sources */,
|
||||
4C3BEFDA281DCA1400B3DE84 /* LikeCounter.swift in Sources */,
|
||||
4C32B9502A9AD44700DC3548 /* FlatBufferBuilder.swift in Sources */,
|
||||
@@ -4974,6 +5023,7 @@
|
||||
4C32B9512A9AD44700DC3548 /* FlatbuffersErrors.swift in Sources */,
|
||||
5CC852A62BE00F180039FFC5 /* HighlightEventRef.swift in Sources */,
|
||||
4CE8794E2996B16A00F758CC /* RelayToggle.swift in Sources */,
|
||||
5C09FD132DF283D700823661 /* FollowPackModel.swift in Sources */,
|
||||
4C3AC79B28306D7B00E1F516 /* Contacts.swift in Sources */,
|
||||
D71AD8FF2CEC176A002E2C3C /* AppAccessibilityIdentifiers.swift in Sources */,
|
||||
4C3EA63D28FF52D600C48A62 /* bolt11.c in Sources */,
|
||||
@@ -5135,6 +5185,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5C4FA7FB2DC29C3800CE658C /* FollowPackView.swift in Sources */,
|
||||
D7F360262CEBBD8B009D34DA /* PresentFullScreenItemNotify.swift in Sources */,
|
||||
82D6FA9A2CD9820500C925F4 /* ShareViewController.swift in Sources */,
|
||||
82D6FAA92CD99F7900C925F4 /* FbConstants.swift in Sources */,
|
||||
@@ -5202,6 +5253,7 @@
|
||||
82D6FAE42CD99F7900C925F4 /* FollowNotify.swift in Sources */,
|
||||
82D6FAE52CD99F7900C925F4 /* LikedNotify.swift in Sources */,
|
||||
82D6FAE62CD99F7900C925F4 /* LocalNotificationNotify.swift in Sources */,
|
||||
5C4FA8012DC5119300CE658C /* FollowPackPreview.swift in Sources */,
|
||||
82D6FAE72CD99F7900C925F4 /* LoginNotify.swift in Sources */,
|
||||
82D6FAE82CD99F7900C925F4 /* LogoutNotify.swift in Sources */,
|
||||
D706C5B12D5D31C20027C627 /* AutoSaveIndicatorView.swift in Sources */,
|
||||
@@ -5233,6 +5285,7 @@
|
||||
82D6FAFD2CD99F7900C925F4 /* IdType.swift in Sources */,
|
||||
82D6FAFE2CD99F7900C925F4 /* Pubkey.swift in Sources */,
|
||||
82D6FAFF2CD99F7900C925F4 /* NoteId.swift in Sources */,
|
||||
D7DF58332DFCF18D00E9AD28 /* SendPaymentView.swift in Sources */,
|
||||
82D6FB002CD99F7900C925F4 /* Referenced.swift in Sources */,
|
||||
5CB0172D2D42C76A00A9ED05 /* BalanceView.swift in Sources */,
|
||||
82D6FB012CD99F7900C925F4 /* Block.swift in Sources */,
|
||||
@@ -5254,6 +5307,7 @@
|
||||
82D6FB0F2CD99F7900C925F4 /* DamusLogoGradient.swift in Sources */,
|
||||
82D6FB102CD99F7900C925F4 /* DamusBackground.swift in Sources */,
|
||||
82D6FB112CD99F7900C925F4 /* DamusLightGradient.swift in Sources */,
|
||||
5C4FA8042DCAF80E00CE658C /* FollowPackTimeline.swift in Sources */,
|
||||
82D6FB132CD99F7900C925F4 /* Shimmer.swift in Sources */,
|
||||
82D6FB142CD99F7900C925F4 /* EndBlock.swift in Sources */,
|
||||
82D6FB152CD99F7900C925F4 /* ImageCarousel.swift in Sources */,
|
||||
@@ -5400,6 +5454,7 @@
|
||||
82D6FB9B2CD99F7900C925F4 /* MutedThreadsManager.swift in Sources */,
|
||||
82D6FB9C2CD99F7900C925F4 /* WalletModel.swift in Sources */,
|
||||
82D6FB9D2CD99F7900C925F4 /* ZapButtonModel.swift in Sources */,
|
||||
5C09FD142DF283D700823661 /* FollowPackModel.swift in Sources */,
|
||||
82D6FB9E2CD99F7900C925F4 /* ContentFilters.swift in Sources */,
|
||||
3A515C512DF4E100002D3B34 /* TrustedNetworkRepliesTip.swift in Sources */,
|
||||
82D6FB9F2CD99F7900C925F4 /* DamusCacheManager.swift in Sources */,
|
||||
@@ -5539,6 +5594,7 @@
|
||||
82D6FC202CD99F7900C925F4 /* RelayType.swift in Sources */,
|
||||
82D6FC212CD99F7900C925F4 /* SignalView.swift in Sources */,
|
||||
82D6FC222CD99F7900C925F4 /* RelayPicView.swift in Sources */,
|
||||
5C4FA7EC2DC29AE900CE658C /* FollowPackEvent.swift in Sources */,
|
||||
82D6FC232CD99F7900C925F4 /* UserSearch.swift in Sources */,
|
||||
82D6FC242CD99F7900C925F4 /* AddMuteItemView.swift in Sources */,
|
||||
82D6FC252CD99F7900C925F4 /* MuteDurationMenu.swift in Sources */,
|
||||
@@ -5559,6 +5615,7 @@
|
||||
82D6FC342CD99F7900C925F4 /* BuilderEventView.swift in Sources */,
|
||||
82D6FC352CD99F7900C925F4 /* EventProfile.swift in Sources */,
|
||||
82D6FC362CD99F7900C925F4 /* EventMenu.swift in Sources */,
|
||||
D7AAD0002E0387B800FB7699 /* LnurlAmountView.swift in Sources */,
|
||||
82D6FC372CD99F7900C925F4 /* EventMutingContainerView.swift in Sources */,
|
||||
82D6FC382CD99F7900C925F4 /* ZapEvent.swift in Sources */,
|
||||
82D6FC392CD99F7900C925F4 /* TextEvent.swift in Sources */,
|
||||
@@ -5710,6 +5767,7 @@
|
||||
D73E5E602C6A97F4007EB227 /* ImageMetadata.swift in Sources */,
|
||||
D73E5E612C6A97F4007EB227 /* ImageProcessing.swift in Sources */,
|
||||
D73E5E622C6A97F4007EB227 /* BlurHashEncode.swift in Sources */,
|
||||
5C09FD122DF283D700823661 /* FollowPackModel.swift in Sources */,
|
||||
D73E5E632C6A97F4007EB227 /* BlurHashDecode.swift in Sources */,
|
||||
D73E5F952C6AA753007EB227 /* FullScreenCarouselView.swift in Sources */,
|
||||
D73E5E642C6A97F4007EB227 /* PostBox.swift in Sources */,
|
||||
@@ -5729,6 +5787,7 @@
|
||||
D73E5E6F2C6A97F4007EB227 /* TimeAgo.swift in Sources */,
|
||||
D73E5E702C6A97F4007EB227 /* Parser.swift in Sources */,
|
||||
D73E5E722C6A97F4007EB227 /* LinkView.swift in Sources */,
|
||||
5C4FA7EE2DC29AE900CE658C /* FollowPackEvent.swift in Sources */,
|
||||
D73E5F922C6AA720007EB227 /* QRCodeView.swift in Sources */,
|
||||
D73E5E742C6A97F4007EB227 /* Lists.swift in Sources */,
|
||||
D73E5E752C6A97F4007EB227 /* CoreSVG.swift in Sources */,
|
||||
@@ -5746,6 +5805,7 @@
|
||||
D73E5E802C6A97F4007EB227 /* CredentialHandler.swift in Sources */,
|
||||
D73E5E812C6A97F4007EB227 /* KeyboardVisible.swift in Sources */,
|
||||
D73E5E832C6A97F4007EB227 /* AVPlayer+Additions.swift in Sources */,
|
||||
5C4FA7FC2DC29C3800CE658C /* FollowPackView.swift in Sources */,
|
||||
D73E5E842C6A97F4007EB227 /* Zaps+.swift in Sources */,
|
||||
D73E5E852C6A97F4007EB227 /* WalletConnect+.swift in Sources */,
|
||||
D73E5E862C6A97F4007EB227 /* DamusPurpleNotificationManagement.swift in Sources */,
|
||||
@@ -5884,6 +5944,7 @@
|
||||
D73E5EFF2C6A97F4007EB227 /* ZapsView.swift in Sources */,
|
||||
D73E5F002C6A97F4007EB227 /* CustomizeZapView.swift in Sources */,
|
||||
D73E5F012C6A97F4007EB227 /* ZapTypePicker.swift in Sources */,
|
||||
5C4FA8052DCAF80E00CE658C /* FollowPackTimeline.swift in Sources */,
|
||||
D73E5F022C6A97F4007EB227 /* ZapUserView.swift in Sources */,
|
||||
D73E5F032C6A97F4007EB227 /* ProfileZapLinkView.swift in Sources */,
|
||||
D7DB930C2D69486700DA1EE5 /* NIP65.swift in Sources */,
|
||||
@@ -5903,6 +5964,7 @@
|
||||
D73E5F0F2C6A97F4007EB227 /* CondensedProfilePicturesView.swift in Sources */,
|
||||
D73E5F102C6A97F4007EB227 /* ProfileEditButton.swift in Sources */,
|
||||
D73E5F112C6A97F4007EB227 /* RelayPaidDetail.swift in Sources */,
|
||||
D7AACFFF2E0387B800FB7699 /* LnurlAmountView.swift in Sources */,
|
||||
D73E5F122C6A97F4007EB227 /* RelayAuthenticationDetail.swift in Sources */,
|
||||
D73E5F132C6A97F4007EB227 /* RelaySoftwareDetail.swift in Sources */,
|
||||
D73E5F142C6A97F4007EB227 /* RelayAdminDetail.swift in Sources */,
|
||||
@@ -5980,6 +6042,7 @@
|
||||
D73E5F512C6A97F5007EB227 /* EventDetailView.swift in Sources */,
|
||||
D73E5F522C6A97F5007EB227 /* FollowButtonView.swift in Sources */,
|
||||
D73E5F532C6A97F5007EB227 /* FollowingView.swift in Sources */,
|
||||
D7DF58322DFCF18D00E9AD28 /* SendPaymentView.swift in Sources */,
|
||||
D73E5F542C6A97F5007EB227 /* LoginView.swift in Sources */,
|
||||
D73E5F552C6A97F5007EB227 /* QRScanNSECView.swift in Sources */,
|
||||
D73E5F562C6A97F5007EB227 /* NoteContentView.swift in Sources */,
|
||||
@@ -6022,6 +6085,7 @@
|
||||
D703D7552C670A3700A400EA /* DamusUserDefaults.swift in Sources */,
|
||||
D703D7A32C670E1D00A400EA /* nostr_bech32.c in Sources */,
|
||||
D703D7992C670DF900A400EA /* sha256.c in Sources */,
|
||||
5C4FA8002DC5119300CE658C /* FollowPackPreview.swift in Sources */,
|
||||
D703D7972C670DED00A400EA /* wasm.c in Sources */,
|
||||
5C8498042D5D150000F74FEB /* ZapExplainer.swift in Sources */,
|
||||
D703D7842C670C4700A400EA /* SequenceUtils.swift in Sources */,
|
||||
|
||||
@@ -13,6 +13,7 @@ enum FilterState : Int {
|
||||
case posts = 0
|
||||
case posts_and_replies = 1
|
||||
case conversations = 2
|
||||
case follow_list = 3
|
||||
|
||||
func filter(ev: NostrEvent) -> Bool {
|
||||
switch self {
|
||||
@@ -22,6 +23,8 @@ enum FilterState : Int {
|
||||
return true
|
||||
case .conversations:
|
||||
return true
|
||||
case .follow_list:
|
||||
return ev.known_kind == .follow_list
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
39
damus/Models/FollowPackEvent.swift
Normal file
39
damus/Models/FollowPackEvent.swift
Normal file
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// FollowPackEvent.swift
|
||||
// damus
|
||||
//
|
||||
// Created by eric on 4/30/25.
|
||||
//
|
||||
|
||||
|
||||
import Foundation
|
||||
|
||||
struct FollowPackEvent {
|
||||
let event: NostrEvent
|
||||
var title: String? = nil
|
||||
var uuid: String? = nil
|
||||
var image: URL? = nil
|
||||
var description: String? = nil
|
||||
var publicKeys: [Pubkey] = []
|
||||
|
||||
|
||||
static func parse(from ev: NostrEvent) -> FollowPackEvent {
|
||||
var followlist = FollowPackEvent(event: ev)
|
||||
|
||||
for tag in ev.tags {
|
||||
guard tag.count >= 2 else { continue }
|
||||
switch tag[0].string() {
|
||||
case "title": followlist.title = tag[1].string()
|
||||
case "d": followlist.uuid = tag[1].string()
|
||||
case "image": followlist.image = URL(string: tag[1].string())
|
||||
case "description": followlist.description = tag[1].string()
|
||||
case "p":
|
||||
followlist.publicKeys.append(Pubkey(Data(hex: tag[1].string())))
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return followlist
|
||||
}
|
||||
}
|
||||
77
damus/Models/FollowPackModel.swift
Normal file
77
damus/Models/FollowPackModel.swift
Normal file
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// FollowPackModel.swift
|
||||
// damus
|
||||
//
|
||||
// Created by eric on 6/5/25.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
class FollowPackModel: ObservableObject {
|
||||
var events: EventHolder
|
||||
@Published var loading: Bool = false
|
||||
|
||||
let damus_state: DamusState
|
||||
let subid = UUID().description
|
||||
let limit: UInt32 = 500
|
||||
|
||||
init(damus_state: DamusState) {
|
||||
self.damus_state = damus_state
|
||||
self.events = EventHolder(on_queue: { ev in
|
||||
preload_events(state: damus_state, events: [ev])
|
||||
})
|
||||
}
|
||||
|
||||
func subscribe(follow_pack_users: [Pubkey]) {
|
||||
loading = true
|
||||
let to_relays = determine_to_relays(pool: damus_state.nostrNetwork.pool, filters: damus_state.relay_filters)
|
||||
var filter = NostrFilter(kinds: [.text, .chat])
|
||||
filter.until = UInt32(Date.now.timeIntervalSince1970)
|
||||
filter.authors = follow_pack_users
|
||||
filter.limit = 500
|
||||
|
||||
damus_state.nostrNetwork.pool.subscribe(sub_id: subid, filters: [filter], handler: handle_event, to: to_relays)
|
||||
}
|
||||
|
||||
func unsubscribe(to: RelayURL? = nil) {
|
||||
loading = false
|
||||
damus_state.nostrNetwork.pool.unsubscribe(sub_id: subid, to: to.map { [$0] })
|
||||
}
|
||||
|
||||
func handle_event(relay_id: RelayURL, conn_ev: NostrConnectionEvent) {
|
||||
guard case .nostr_event(let event) = conn_ev else {
|
||||
return
|
||||
}
|
||||
|
||||
switch event {
|
||||
case .event(let sub_id, let ev):
|
||||
guard sub_id == self.subid else {
|
||||
return
|
||||
}
|
||||
if ev.is_textlike && should_show_event(state: damus_state, ev: ev) && !ev.is_reply()
|
||||
{
|
||||
if self.events.insert(ev) {
|
||||
self.objectWillChange.send()
|
||||
}
|
||||
}
|
||||
case .notice(let msg):
|
||||
print("follow pack notice: \(msg)")
|
||||
case .ok:
|
||||
break
|
||||
case .eose(let sub_id):
|
||||
loading = false
|
||||
|
||||
if sub_id == self.subid {
|
||||
unsubscribe(to: relay_id)
|
||||
|
||||
guard let txn = NdbTxn(ndb: damus_state.ndb) else { return }
|
||||
}
|
||||
|
||||
break
|
||||
case .auth:
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,6 +227,8 @@ class HomeModel: ContactsDelegate {
|
||||
break
|
||||
case .relay_list:
|
||||
break // This will be handled by `UserRelayListManager`
|
||||
case .follow_list:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,24 +292,12 @@ class HomeModel: ContactsDelegate {
|
||||
Log.debug("HomeModel: got NWC response, %s not found in the postbox, nothing to remove [%s]", for: .nwc, resp.req_id.hex(), relay.absoluteString)
|
||||
}
|
||||
|
||||
damus_state.wallet.handle_nwc_response(response: resp) // This can handle success or error cases
|
||||
|
||||
guard resp.response.error == nil else {
|
||||
Log.error("HomeModel: NWC wallet raised an error: %s", for: .nwc, String(describing: resp.response))
|
||||
WalletConnect.handle_error(zapcache: self.damus_state.zaps, evcache: self.damus_state.events, resp: resp)
|
||||
if let humanReadableError = resp.response.error?.humanReadableError {
|
||||
present_sheet(.error(humanReadableError))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if resp.response.result_type == .list_transactions {
|
||||
Log.info("Received NWC transaction list from %s", for: .nwc, relay.absoluteString)
|
||||
damus_state.wallet.handle_nwc_response(response: resp)
|
||||
return
|
||||
}
|
||||
|
||||
if resp.response.result_type == .get_balance {
|
||||
Log.info("Received NWC balance information from %s", for: .nwc, relay.absoluteString)
|
||||
damus_state.wallet.handle_nwc_response(response: resp)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -163,6 +163,10 @@ struct LightningInvoice<T> {
|
||||
let payment_hash: Data
|
||||
let created_at: UInt64
|
||||
|
||||
var abbreviated: String {
|
||||
return self.string.prefix(8) + "…" + self.string.suffix(8)
|
||||
}
|
||||
|
||||
var description_string: String {
|
||||
switch description {
|
||||
case .description(let string):
|
||||
@@ -171,6 +175,17 @@ struct LightningInvoice<T> {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
static func from(string: String) -> Invoice? {
|
||||
// This feels a bit hacky at first, but it is actually clean
|
||||
// because it reuses the same well-tested parsing logic as the rest of the app,
|
||||
// avoiding code duplication and utilizing the guarantees acquired from age and testing.
|
||||
// We could also use the C function `parse_invoice`, but it requires extra C bridging logic.
|
||||
// NDBTODO: This may need updating on the nostrdb upgrade.
|
||||
let parsedBlocks = parse_note_content(content: .content(string,nil)).blocks
|
||||
guard parsedBlocks.count == 1 else { return nil }
|
||||
return parsedBlocks[0].asInvoice
|
||||
}
|
||||
}
|
||||
|
||||
func maybe_pointee<T>(_ p: UnsafeMutablePointer<T>!) -> T? {
|
||||
@@ -192,6 +207,13 @@ enum Amount: Equatable {
|
||||
return format_msats(amt)
|
||||
}
|
||||
}
|
||||
|
||||
func amount_sats() -> Int64? {
|
||||
switch self {
|
||||
case .any: nil
|
||||
case .specific(let amount): amount / 1000
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func format_msats_abbrev(_ msats: Int64) -> String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
//
|
||||
// SearchHomeModel.swift
|
||||
// damus
|
||||
//
|
||||
@@ -16,6 +15,7 @@ class SearchHomeModel: ObservableObject {
|
||||
var seen_pubkey: Set<Pubkey> = Set()
|
||||
let damus_state: DamusState
|
||||
let base_subid = UUID().description
|
||||
let follow_pack_subid = UUID().description
|
||||
let profiles_subid = UUID().description
|
||||
let limit: UInt32 = 500
|
||||
//let multiple_events_per_pubkey: Bool = false
|
||||
@@ -42,12 +42,18 @@ class SearchHomeModel: ObservableObject {
|
||||
func subscribe() {
|
||||
loading = true
|
||||
let to_relays = determine_to_relays(pool: damus_state.nostrNetwork.pool, filters: damus_state.relay_filters)
|
||||
|
||||
var follow_list_filter = NostrFilter(kinds: [.follow_list])
|
||||
follow_list_filter.until = UInt32(Date.now.timeIntervalSince1970)
|
||||
|
||||
damus_state.nostrNetwork.pool.subscribe(sub_id: base_subid, filters: [get_base_filter()], handler: handle_event, to: to_relays)
|
||||
damus_state.nostrNetwork.pool.subscribe(sub_id: follow_pack_subid, filters: [follow_list_filter], handler: handle_event, to: to_relays)
|
||||
}
|
||||
|
||||
func unsubscribe(to: RelayURL? = nil) {
|
||||
loading = false
|
||||
damus_state.nostrNetwork.pool.unsubscribe(sub_id: base_subid, to: to.map { [$0] })
|
||||
damus_state.nostrNetwork.pool.unsubscribe(sub_id: follow_pack_subid, to: to.map { [$0] })
|
||||
}
|
||||
|
||||
func handle_event(relay_id: RelayURL, conn_ev: NostrConnectionEvent) {
|
||||
@@ -57,7 +63,7 @@ class SearchHomeModel: ObservableObject {
|
||||
|
||||
switch event {
|
||||
case .event(let sub_id, let ev):
|
||||
guard sub_id == self.base_subid || sub_id == self.profiles_subid else {
|
||||
guard sub_id == self.base_subid || sub_id == self.profiles_subid || sub_id == self.follow_pack_subid else {
|
||||
return
|
||||
}
|
||||
if ev.is_textlike && should_show_event(state: damus_state, ev: ev) && !ev.is_reply()
|
||||
|
||||
@@ -36,7 +36,7 @@ class SearchModel: ObservableObject {
|
||||
func subscribe() {
|
||||
// since 1 month
|
||||
search.limit = self.limit
|
||||
search.kinds = [.text, .like, .longform, .highlight]
|
||||
search.kinds = [.text, .like, .longform, .highlight, .follow_list]
|
||||
|
||||
//likes_filter.ids = ref_events.referenced_ids!
|
||||
|
||||
|
||||
@@ -27,6 +27,11 @@ class WalletModel: ObservableObject {
|
||||
|
||||
@Published private(set) var connect_state: WalletConnectState
|
||||
|
||||
/// A dictionary listing continuations waiting for a response for each request note id.
|
||||
///
|
||||
/// Please see the `waitForResponse` method for context.
|
||||
private var continuations: [NoteId: CheckedContinuation<WalletConnect.Response.Result, any Error>] = [:]
|
||||
|
||||
init(state: WalletConnectState, settings: UserSettingsStore) {
|
||||
self.connect_state = state
|
||||
self.previous_state = .none
|
||||
@@ -75,12 +80,16 @@ class WalletModel: ObservableObject {
|
||||
///
|
||||
/// - Parameter response: The NWC response received from the network
|
||||
func handle_nwc_response(response: WalletConnect.FullWalletResponse) {
|
||||
switch response.response.result {
|
||||
if let error = response.response.error {
|
||||
self.resume(request: response.req_id, throwing: error)
|
||||
return
|
||||
}
|
||||
guard let result = response.response.result else { return }
|
||||
self.resume(request: response.req_id, with: result)
|
||||
switch result {
|
||||
case .get_balance(let balanceResp):
|
||||
self.balance = balanceResp.balance / 1000
|
||||
case .none:
|
||||
return
|
||||
case .some(.pay_invoice(_)):
|
||||
case .pay_invoice(_):
|
||||
return
|
||||
case .list_transactions(let transactionsResp):
|
||||
self.transactions = transactionsResp.transactions
|
||||
@@ -91,4 +100,41 @@ class WalletModel: ObservableObject {
|
||||
self.transactions = nil
|
||||
self.balance = nil
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Async wallet response waiting mechanism
|
||||
|
||||
func waitForResponse(for requestId: NoteId, timeout: Duration = .seconds(10)) async throws -> WalletConnect.Response.Result {
|
||||
return try await withCheckedThrowingContinuation({ continuation in
|
||||
self.continuations[requestId] = continuation
|
||||
|
||||
let timeoutTask = Task {
|
||||
try? await Task.sleep(for: timeout)
|
||||
self.resume(request: requestId, throwing: WaitError.timeout) // Must resume the continuation exactly once even if there is no response
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private func resume(request requestId: NoteId, with result: WalletConnect.Response.Result) {
|
||||
continuations[requestId]?.resume(returning: result)
|
||||
continuations[requestId] = nil // Never resume a continuation twice
|
||||
}
|
||||
|
||||
private func resume(request requestId: NoteId, throwing error: any Error) {
|
||||
if let continuation = continuations[requestId] {
|
||||
continuation.resume(throwing: error)
|
||||
continuations[requestId] = nil // Never resume a continuation twice
|
||||
return // Error will be handled by the listener, no need for the generic error sheet
|
||||
}
|
||||
|
||||
// No listeners to catch the error, show generic error sheet
|
||||
if let error = error as? WalletConnect.WalletResponseErr,
|
||||
let humanReadableError = error.humanReadableError {
|
||||
present_sheet(.error(humanReadableError))
|
||||
}
|
||||
}
|
||||
|
||||
enum WaitError: Error {
|
||||
case timeout
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,4 +30,5 @@ enum NostrKind: UInt32, Codable {
|
||||
case nwc_response = 23195
|
||||
case http_auth = 27235
|
||||
case status = 30315
|
||||
case follow_list = 39089
|
||||
}
|
||||
|
||||
@@ -202,3 +202,13 @@ extension Block {
|
||||
}
|
||||
}
|
||||
}
|
||||
extension Block {
|
||||
var asInvoice: Invoice? {
|
||||
switch self {
|
||||
case .invoice(let invoice):
|
||||
return invoice
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ enum Route: Hashable {
|
||||
case FollowersYouKnow(friendedFollowers: [Pubkey], followers: FollowersModel)
|
||||
case NIP05DomainEvents(events: NIP05DomainEventsModel, nip05_domain_favicon: FaviconURL?)
|
||||
case NIP05DomainPubkeys(domain: String, nip05_domain_favicon: FaviconURL?, pubkeys: [Pubkey])
|
||||
case FollowPack(followPack: NostrEvent, model: FollowPackModel, blur_imgs: Bool)
|
||||
|
||||
@ViewBuilder
|
||||
func view(navigationCoordinator: NavigationCoordinator, damusState: DamusState) -> some View {
|
||||
@@ -134,6 +135,8 @@ enum Route: Hashable {
|
||||
NIP05DomainTimelineView(damus_state: damusState, model: events, nip05_domain_favicon: nip05_domain_favicon)
|
||||
case .NIP05DomainPubkeys(let domain, let nip05_domain_favicon, let pubkeys):
|
||||
NIP05DomainPubkeysView(damus_state: damusState, domain: domain, nip05_domain_favicon: nip05_domain_favicon, pubkeys: pubkeys)
|
||||
case .FollowPack(let followPack, let followPackModel, let blur_imgs):
|
||||
FollowPackView(state: damusState, ev: followPack, model: followPackModel, blur_imgs: blur_imgs)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,6 +247,9 @@ enum Route: Hashable {
|
||||
case .NIP05DomainPubkeys(let domain, _, _):
|
||||
hasher.combine("nip05DomainPubkeys")
|
||||
hasher.combine(domain)
|
||||
case .FollowPack(let followPack, let followPackModel, let blur_imgs):
|
||||
hasher.combine("followPack")
|
||||
hasher.combine(followPack.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ extension WalletConnect {
|
||||
let req_id: NoteId
|
||||
let response: Response
|
||||
|
||||
init(from event: NostrEvent, nwc: WalletConnect.ConnectURL) async throws(InitializationError) {
|
||||
init(from event: NostrEvent, nwc: WalletConnect.ConnectURL) throws(InitializationError) {
|
||||
guard event.pubkey == nwc.pubkey else { throw .incorrectAuthorPubkey }
|
||||
|
||||
guard let referencedNoteId = event.referenced_ids.first else { throw .missingRequestIdReference }
|
||||
@@ -85,7 +85,7 @@ extension WalletConnect {
|
||||
}
|
||||
}
|
||||
|
||||
struct WalletResponseErr: Codable {
|
||||
struct WalletResponseErr: Codable, Error {
|
||||
let code: Code?
|
||||
let message: String?
|
||||
|
||||
|
||||
@@ -105,6 +105,28 @@ extension WalletConnect {
|
||||
post.send(ev, to: [url.relay], skip_ephemeral: false, delay: delay, on_flush: on_flush)
|
||||
return ev
|
||||
}
|
||||
|
||||
@MainActor
|
||||
static func refresh_wallet_information(damus_state: DamusState) async {
|
||||
damus_state.wallet.resetWalletStateInformation()
|
||||
await Self.update_wallet_information(damus_state: damus_state)
|
||||
}
|
||||
|
||||
@MainActor
|
||||
static func update_wallet_information(damus_state: DamusState) async {
|
||||
guard let url = damus_state.settings.nostr_wallet_connect,
|
||||
let nwc = WalletConnectURL(str: url) else {
|
||||
return
|
||||
}
|
||||
|
||||
let flusher: OnFlush? = nil
|
||||
|
||||
let delay = 0.0 // We don't need a delay when fetching a transaction list or balance
|
||||
|
||||
WalletConnect.request_transaction_list(url: nwc, pool: damus_state.nostrNetwork.pool, post: damus_state.nostrNetwork.postbox, delay: delay, on_flush: flusher)
|
||||
WalletConnect.request_balance_information(url: nwc, pool: damus_state.nostrNetwork.pool, post: damus_state.nostrNetwork.postbox, delay: delay, on_flush: flusher)
|
||||
return
|
||||
}
|
||||
|
||||
static func handle_zap_success(state: DamusState, resp: WalletConnect.FullWalletResponse) {
|
||||
// find the pending zap and mark it as pending-confirmed
|
||||
|
||||
242
damus/Views/Events/FollowPack/FollowPackPreview.swift
Normal file
242
damus/Views/Events/FollowPack/FollowPackPreview.swift
Normal file
@@ -0,0 +1,242 @@
|
||||
//
|
||||
// FollowPackPreview.swift
|
||||
// damus
|
||||
//
|
||||
// Created by eric on 4/30/25.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import Kingfisher
|
||||
|
||||
struct FollowPackUsers: View {
|
||||
let state: DamusState
|
||||
var publicKeys: [Pubkey]
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment: .center) {
|
||||
|
||||
if !publicKeys.isEmpty {
|
||||
CondensedProfilePicturesView(state: state, pubkeys: publicKeys, maxPictures: 5)
|
||||
}
|
||||
|
||||
let followPackUserCount = publicKeys.count
|
||||
let nounString = pluralizedString(key: "follow_pack_user_count", count: followPackUserCount)
|
||||
let nounText = Text(verbatim: nounString).font(.subheadline).foregroundColor(.gray)
|
||||
Text("\(Text(verbatim: followPackUserCount.formatted()).font(.subheadline.weight(.medium))) \(nounText)", comment: "Sentence composed of 2 variables to describe how many people are in the follow pack. In source English, the first variable is the number of users, and the second variable is 'user' or 'users'.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct FollowPackBannerImage: View {
|
||||
let state: DamusState
|
||||
let options: EventViewOptions
|
||||
var image: URL? = nil
|
||||
var preview: Bool
|
||||
@State var blur_imgs: Bool
|
||||
|
||||
func Placeholder(url: URL, preview: Bool) -> some View {
|
||||
Group {
|
||||
if let meta = state.events.lookup_img_metadata(url: url),
|
||||
case .processed(let blurhash) = meta.state {
|
||||
Image(uiImage: blurhash)
|
||||
.resizable()
|
||||
.frame(maxWidth: preview ? 350 : UIScreen.main.bounds.width, minHeight: preview ? 180 : 200, maxHeight: preview ? 180 : 200)
|
||||
} else {
|
||||
DamusColors.adaptableWhite
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func titleImage(url: URL, preview: Bool) -> some View {
|
||||
KFAnimatedImage(url)
|
||||
.callbackQueue(.dispatch(.global(qos:.background)))
|
||||
.backgroundDecode(true)
|
||||
.imageContext(.note, disable_animation: state.settings.disable_animation)
|
||||
.image_fade(duration: 0.25)
|
||||
.cancelOnDisappear(true)
|
||||
.configure { view in
|
||||
view.framePreloadCount = 3
|
||||
}
|
||||
.background {
|
||||
Placeholder(url: url, preview: preview)
|
||||
}
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.frame(maxWidth: preview ? 350 : UIScreen.main.bounds.width, minHeight: preview ? 180 : 200, maxHeight: preview ? 180 : 200)
|
||||
.kfClickable()
|
||||
.cornerRadius(1)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
if let url = image {
|
||||
if (self.options.contains(.no_media)) {
|
||||
EmptyView()
|
||||
} else if !blur_imgs {
|
||||
titleImage(url: url, preview: preview)
|
||||
} else {
|
||||
ZStack {
|
||||
titleImage(url: url, preview: preview)
|
||||
BlurOverlayView(blur_images: $blur_imgs, artifacts: nil, size: nil, damus_state: nil, parentView: .longFormView)
|
||||
.frame(maxWidth: preview ? 350 : UIScreen.main.bounds.width, minHeight: preview ? 180 : 200, maxHeight: preview ? 180 : 200)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Text(NSLocalizedString("No cover image", comment: "Text letting user know there is no cover image."))
|
||||
.foregroundColor(.gray)
|
||||
.frame(width: 350, height: 180)
|
||||
Divider()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
struct FollowPackPreviewBody: View {
|
||||
let state: DamusState
|
||||
let event: FollowPackEvent
|
||||
let options: EventViewOptions
|
||||
let header: Bool
|
||||
@State var blur_imgs: Bool
|
||||
|
||||
@ObservedObject var artifacts: NoteArtifactsModel
|
||||
|
||||
init(state: DamusState, ev: FollowPackEvent, options: EventViewOptions, header: Bool, blur_imgs: Bool) {
|
||||
self.state = state
|
||||
self.event = ev
|
||||
self.options = options
|
||||
self.header = header
|
||||
self.blur_imgs = blur_imgs
|
||||
|
||||
self._artifacts = ObservedObject(wrappedValue: state.events.get_cache_data(ev.event.id).artifacts_model)
|
||||
}
|
||||
|
||||
init(state: DamusState, ev: NostrEvent, options: EventViewOptions, header: Bool, blur_imgs: Bool) {
|
||||
self.state = state
|
||||
self.event = FollowPackEvent.parse(from: ev)
|
||||
self.options = options
|
||||
self.header = header
|
||||
self.blur_imgs = blur_imgs
|
||||
|
||||
self._artifacts = ObservedObject(wrappedValue: state.events.get_cache_data(ev.id).artifacts_model)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
Group {
|
||||
if options.contains(.wide) {
|
||||
Main.padding(.horizontal)
|
||||
} else {
|
||||
Main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var Main: some View {
|
||||
VStack(alignment: .leading, spacing: 10) {
|
||||
|
||||
if state.settings.media_previews {
|
||||
FollowPackBannerImage(state: state, options: options, image: event.image, preview: true, blur_imgs: blur_imgs)
|
||||
}
|
||||
|
||||
Text(event.title ?? NSLocalizedString("Untitled", comment: "Title of follow list event if it is untitled."))
|
||||
.font(header ? .title : .headline)
|
||||
.padding(.horizontal, 10)
|
||||
.padding(.top, 5)
|
||||
|
||||
if let description = event.description {
|
||||
Text(description)
|
||||
.font(header ? .body : .caption)
|
||||
.foregroundColor(.gray)
|
||||
.padding(.horizontal, 10)
|
||||
} else {
|
||||
Text("")
|
||||
.font(header ? .body : .caption)
|
||||
.foregroundColor(.gray)
|
||||
.padding(.horizontal, 10)
|
||||
}
|
||||
|
||||
HStack(alignment: .center) {
|
||||
ProfilePicView(pubkey: event.event.pubkey, size: 25, highlight: .none, profiles: state.profiles, disable_animation: state.settings.disable_animation, show_zappability: true)
|
||||
.onTapGesture {
|
||||
state.nav.push(route: Route.ProfileByKey(pubkey: event.event.pubkey))
|
||||
}
|
||||
let profile_txn = state.profiles.lookup(id: event.event.pubkey)
|
||||
let profile = profile_txn?.unsafeUnownedValue
|
||||
let displayName = Profile.displayName(profile: profile, pubkey: event.event.pubkey)
|
||||
switch displayName {
|
||||
case .one(let one):
|
||||
Text(one)
|
||||
.font(.subheadline).foregroundColor(.gray)
|
||||
|
||||
case .both(username: let username, displayName: let displayName):
|
||||
HStack(spacing: 6) {
|
||||
Text(verbatim: displayName)
|
||||
.font(.subheadline).foregroundColor(.gray)
|
||||
|
||||
Text(verbatim: "@\(username)")
|
||||
.font(.subheadline).foregroundColor(.gray)
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 10)
|
||||
|
||||
FollowPackUsers(state: state, publicKeys: event.publicKeys)
|
||||
.padding(.horizontal, 10)
|
||||
.padding(.bottom, 20)
|
||||
}
|
||||
.frame(width: 350, height: state.settings.media_previews ? 330 : 150, alignment: .leading)
|
||||
.background(DamusColors.neutral3)
|
||||
.cornerRadius(10)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 10)
|
||||
.stroke(DamusColors.neutral1, lineWidth: 1)
|
||||
)
|
||||
.padding(.top, 10)
|
||||
}
|
||||
}
|
||||
|
||||
struct FollowPackPreview: View {
|
||||
let state: DamusState
|
||||
let event: FollowPackEvent
|
||||
let options: EventViewOptions
|
||||
@State var blur_imgs: Bool
|
||||
|
||||
init(state: DamusState, ev: NostrEvent, options: EventViewOptions, blur_imgs: Bool) {
|
||||
self.state = state
|
||||
self.event = FollowPackEvent.parse(from: ev)
|
||||
self.options = options.union(.no_mentions)
|
||||
self.blur_imgs = blur_imgs
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
FollowPackPreviewBody(state: state, ev: event, options: options, header: false, blur_imgs: blur_imgs)
|
||||
}
|
||||
}
|
||||
|
||||
let test_follow_list_event = FollowPackEvent.parse(from: NostrEvent(
|
||||
content: "",
|
||||
keypair: test_keypair,
|
||||
kind: NostrKind.longform.rawValue,
|
||||
tags: [
|
||||
["title", "DAMUSES"],
|
||||
["description", "Damus Team"],
|
||||
["published_at", "1685638715"],
|
||||
["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"],
|
||||
["p", "8b2be0a0ad34805d76679272c28a77dbede9adcbfdca48c681ec8b624a1208a6"],
|
||||
["p", "17538dc2a62769d09443f18c37cbe358fab5bbf981173542aa7c5ff171ed77c4"],
|
||||
["p", "520830c334a3f79f88cac934580d26f91a7832c6b21fb9625690ea2ed81b5626"],
|
||||
["p", "2779f3d9f42c7dee17f0e6bcdcf89a8f9d592d19e3b1bbd27ef1cffd1a7f98d1"],
|
||||
["p", "bd1e19980e2c91e6dc657e92c25762ca882eb9272d2579e221f037f93788de91"],
|
||||
["p", "e7424ad457e512fdf4764a56bf6d428a06a13a1006af1fb8e0fe32f6d03265c7"],
|
||||
["p", "b88c7f007bbf3bc2fcaeff9e513f186bab33782c0baa6a6cc12add78b9110ba3"],
|
||||
["p", "4a0510f26880d40e432f4865cb5714d9d3c200ca6ebb16b418ae6c555f574967"],
|
||||
["image", "https://damus.io/img/logo.png"],
|
||||
])!
|
||||
)
|
||||
|
||||
|
||||
struct FollowPackPreview_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VStack {
|
||||
FollowPackPreview(state: test_damus_state, ev: test_follow_list_event.event, options: [], blur_imgs: false)
|
||||
}
|
||||
.frame(height: 400)
|
||||
}
|
||||
}
|
||||
135
damus/Views/Events/FollowPack/FollowPackTimeline.swift
Normal file
135
damus/Views/Events/FollowPack/FollowPackTimeline.swift
Normal file
@@ -0,0 +1,135 @@
|
||||
//
|
||||
// FollowPackTimeline.swift
|
||||
// damus
|
||||
//
|
||||
// Created by eric on 5/6/25.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct FollowPackTimelineView<Content: View>: View {
|
||||
@ObservedObject var events: EventHolder
|
||||
@Binding var loading: Bool
|
||||
|
||||
let damus: DamusState
|
||||
let show_friend_icon: Bool
|
||||
let filter: (NostrEvent) -> Bool
|
||||
let content: Content?
|
||||
let apply_mute_rules: Bool
|
||||
|
||||
init(events: EventHolder, loading: Binding<Bool>, headerHeight: Binding<CGFloat>, headerOffset: Binding<CGFloat>, damus: DamusState, show_friend_icon: Bool, filter: @escaping (NostrEvent) -> Bool, apply_mute_rules: Bool = true, content: (() -> Content)? = nil) {
|
||||
self.events = events
|
||||
self._loading = loading
|
||||
self.damus = damus
|
||||
self.show_friend_icon = show_friend_icon
|
||||
self.filter = filter
|
||||
self.apply_mute_rules = apply_mute_rules
|
||||
self.content = content?()
|
||||
}
|
||||
|
||||
init(events: EventHolder, loading: Binding<Bool>, damus: DamusState, show_friend_icon: Bool, filter: @escaping (NostrEvent) -> Bool, apply_mute_rules: Bool = true, content: (() -> Content)? = nil) {
|
||||
self.events = events
|
||||
self._loading = loading
|
||||
self.damus = damus
|
||||
self.show_friend_icon = show_friend_icon
|
||||
self.filter = filter
|
||||
self.apply_mute_rules = apply_mute_rules
|
||||
self.content = content?()
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
MainContent
|
||||
}
|
||||
|
||||
var MainContent: some View {
|
||||
ScrollViewReader { scroller in
|
||||
ScrollView(.horizontal) {
|
||||
if let content {
|
||||
content
|
||||
}
|
||||
|
||||
Color.clear
|
||||
.id("startblock")
|
||||
.frame(height: 0)
|
||||
|
||||
FollowPackInnerView(events: events, damus: damus, filter: loading ? { _ in true } : filter, apply_mute_rules: self.apply_mute_rules)
|
||||
.redacted(reason: loading ? .placeholder : [])
|
||||
.shimmer(loading)
|
||||
.disabled(loading)
|
||||
.background {
|
||||
GeometryReader { proxy -> Color in
|
||||
handle_scroll_queue(proxy, queue: self.events)
|
||||
return Color.clear
|
||||
}
|
||||
}
|
||||
}
|
||||
.coordinateSpace(name: "scroll")
|
||||
.onReceive(handle_notify(.scroll_to_top)) { () in
|
||||
events.flush()
|
||||
self.events.should_queue = false
|
||||
scroll_to_event(scroller: scroller, id: "startblock", delay: 0.0, animate: true, anchor: .top)
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
events.flush()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct FollowPackInnerView: View {
|
||||
@ObservedObject var events: EventHolder
|
||||
let state: DamusState
|
||||
let filter: (NostrEvent) -> Bool
|
||||
|
||||
init(events: EventHolder, damus: DamusState, filter: @escaping (NostrEvent) -> Bool, apply_mute_rules: Bool = true) {
|
||||
self.events = events
|
||||
self.state = damus
|
||||
self.filter = apply_mute_rules ? { filter($0) && !damus.mutelist_manager.is_event_muted($0) } : filter
|
||||
}
|
||||
|
||||
var event_options: EventViewOptions {
|
||||
if self.state.settings.truncate_timeline_text {
|
||||
return [.wide, .truncate_content]
|
||||
}
|
||||
|
||||
return [.wide]
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
LazyHStack(spacing: 0) {
|
||||
let events = self.events.events
|
||||
if events.isEmpty {
|
||||
EmptyTimelineView()
|
||||
} else {
|
||||
let evs = events.filter(filter)
|
||||
let indexed = Array(zip(evs, 0...))
|
||||
ForEach(indexed, id: \.0.id) { tup in
|
||||
let ev = tup.0
|
||||
let ind = tup.1
|
||||
let blur_imgs = should_blur_images(settings: state.settings, contacts: state.contacts, ev: ev, our_pubkey: state.pubkey)
|
||||
if ev.kind == NostrKind.follow_list.rawValue {
|
||||
FollowPackPreview(state: state, ev: ev, options: event_options, blur_imgs: blur_imgs)
|
||||
.onTapGesture {
|
||||
state.nav.push(route: Route.FollowPack(followPack: ev, model: FollowPackModel(damus_state: state), blur_imgs: blur_imgs))
|
||||
}
|
||||
.padding(.top, 7)
|
||||
.onAppear {
|
||||
let to_preload =
|
||||
Array([indexed[safe: ind+1]?.0,
|
||||
indexed[safe: ind+2]?.0,
|
||||
indexed[safe: ind+3]?.0,
|
||||
indexed[safe: ind+4]?.0,
|
||||
indexed[safe: ind+5]?.0
|
||||
].compactMap({ $0 }))
|
||||
|
||||
preload_events(state: state, events: to_preload)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.bottom)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
176
damus/Views/Events/FollowPack/FollowPackView.swift
Normal file
176
damus/Views/Events/FollowPack/FollowPackView.swift
Normal file
@@ -0,0 +1,176 @@
|
||||
//
|
||||
// FollowPackView.swift
|
||||
// damus
|
||||
//
|
||||
// Created by eric on 4/30/25.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import Kingfisher
|
||||
|
||||
struct FollowPackView: View {
|
||||
let state: DamusState
|
||||
let event: FollowPackEvent
|
||||
@StateObject var model: FollowPackModel
|
||||
@State var blur_imgs: Bool
|
||||
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
|
||||
@ObservedObject var artifacts: NoteArtifactsModel
|
||||
|
||||
init(state: DamusState, ev: FollowPackEvent, model: FollowPackModel, blur_imgs: Bool) {
|
||||
self.state = state
|
||||
self.event = ev
|
||||
self._model = StateObject(wrappedValue: model)
|
||||
self.blur_imgs = blur_imgs
|
||||
|
||||
self._artifacts = ObservedObject(wrappedValue: state.events.get_cache_data(ev.event.id).artifacts_model)
|
||||
}
|
||||
|
||||
init(state: DamusState, ev: NostrEvent, model: FollowPackModel, blur_imgs: Bool) {
|
||||
self.state = state
|
||||
self.event = FollowPackEvent.parse(from: ev)
|
||||
self._model = StateObject(wrappedValue: model)
|
||||
self.blur_imgs = blur_imgs
|
||||
|
||||
self._artifacts = ObservedObject(wrappedValue: state.events.get_cache_data(ev.id).artifacts_model)
|
||||
}
|
||||
|
||||
func content_filter(_ pubkeys: [Pubkey]) -> ((NostrEvent) -> Bool) {
|
||||
var filters = ContentFilters.defaults(damus_state: self.state)
|
||||
filters.append({ pubkeys.contains($0.pubkey) })
|
||||
return ContentFilters(filters: filters).filter
|
||||
}
|
||||
|
||||
enum FollowPackTabSelection: Int {
|
||||
case people = 0
|
||||
case posts = 1
|
||||
}
|
||||
|
||||
@State var tab_selection: FollowPackTabSelection = .people
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
ScrollView {
|
||||
FollowPackHeader
|
||||
|
||||
FollowPackTabs
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
if model.events.events.isEmpty {
|
||||
model.subscribe(follow_pack_users: event.publicKeys)
|
||||
}
|
||||
}
|
||||
.onDisappear {
|
||||
model.unsubscribe()
|
||||
}
|
||||
}
|
||||
|
||||
var tabs: [(String, FollowPackTabSelection)] {
|
||||
let tabs = [
|
||||
(NSLocalizedString("People", comment: "Label for filter for seeing the people in this follow pack."), FollowPackTabSelection.people),
|
||||
(NSLocalizedString("Posts", comment: "Label for filter for seeing the posts from the people in this follow pack."), FollowPackTabSelection.posts)
|
||||
]
|
||||
return tabs
|
||||
}
|
||||
|
||||
var FollowPackTabs: some View {
|
||||
|
||||
VStack(spacing: 0) {
|
||||
VStack(spacing: 0) {
|
||||
CustomPicker(tabs: tabs, selection: $tab_selection)
|
||||
Divider()
|
||||
.frame(height: 1)
|
||||
}
|
||||
.background(colorScheme == .dark ? Color.black : Color.white)
|
||||
|
||||
if tab_selection == FollowPackTabSelection.people {
|
||||
LazyVStack(alignment: .leading) {
|
||||
ForEach(event.publicKeys.reversed(), id: \.self) { pk in
|
||||
FollowUserView(target: .pubkey(pk), damus_state: state)
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
.padding(.bottom, 50)
|
||||
.tag(FollowPackTabSelection.people)
|
||||
.id(FollowPackTabSelection.people)
|
||||
}
|
||||
|
||||
if tab_selection == FollowPackTabSelection.posts {
|
||||
InnerTimelineView(events: model.events, damus: state, filter: content_filter(event.publicKeys))
|
||||
}
|
||||
}
|
||||
.onAppear() {
|
||||
model.subscribe(follow_pack_users: event.publicKeys)
|
||||
}
|
||||
.onDisappear {
|
||||
model.unsubscribe()
|
||||
}
|
||||
}
|
||||
|
||||
var FollowPackHeader: some View {
|
||||
VStack(alignment: .leading, spacing: 10) {
|
||||
|
||||
if state.settings.media_previews {
|
||||
FollowPackBannerImage(state: state, options: EventViewOptions(), image: event.image, preview: false, blur_imgs: blur_imgs)
|
||||
}
|
||||
|
||||
Text(event.title ?? NSLocalizedString("Untitled", comment: "Title of follow list event if it is untitled."))
|
||||
.font(.title)
|
||||
.padding(.horizontal, 10)
|
||||
.padding(.top, 5)
|
||||
|
||||
if let description = event.description {
|
||||
Text(description)
|
||||
.font(.body)
|
||||
.foregroundColor(.gray)
|
||||
.padding(.horizontal, 10)
|
||||
} else {
|
||||
EmptyView()
|
||||
}
|
||||
|
||||
HStack(alignment: .center) {
|
||||
ProfilePicView(pubkey: event.event.pubkey, size: 25, highlight: .none, profiles: state.profiles, disable_animation: state.settings.disable_animation, show_zappability: true)
|
||||
.onTapGesture {
|
||||
state.nav.push(route: Route.ProfileByKey(pubkey: event.event.pubkey))
|
||||
}
|
||||
let profile_txn = state.profiles.lookup(id: event.event.pubkey)
|
||||
let profile = profile_txn?.unsafeUnownedValue
|
||||
let displayName = Profile.displayName(profile: profile, pubkey: event.event.pubkey)
|
||||
switch displayName {
|
||||
case .one(let one):
|
||||
Text("Created by \(one)", comment: "Lets the user know who created this follow pack.")
|
||||
.font(.subheadline).foregroundColor(.gray)
|
||||
|
||||
case .both(username: let username, displayName: let displayName):
|
||||
HStack(spacing: 6) {
|
||||
Text("Created by \(displayName)", comment: "Lets the user know who created this follow pack.")
|
||||
.font(.subheadline).foregroundColor(.gray)
|
||||
|
||||
Text(verbatim: "@\(username)")
|
||||
.font(.subheadline).foregroundColor(.gray)
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 10)
|
||||
.padding(.bottom, 20)
|
||||
|
||||
HStack(alignment: .center) {
|
||||
FollowPackUsers(state: state, publicKeys: event.publicKeys)
|
||||
}
|
||||
.padding(.horizontal, 10)
|
||||
.padding(.bottom, 20)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
struct FollowPackView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VStack {
|
||||
FollowPackView(state: test_damus_state, ev: test_follow_list_event, model: FollowPackModel(damus_state: test_damus_state), blur_imgs: false)
|
||||
}
|
||||
.frame(height: 400)
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@ class LoadableNostrEventViewModel: ObservableObject {
|
||||
case .zap, .zap_request:
|
||||
guard let zap = await get_zap(from: ev, state: damus_state) else { return .not_found }
|
||||
return .loaded(route: Route.Zaps(target: zap.target))
|
||||
case .contacts, .metadata, .delete, .boost, .chat, .mute_list, .list_deprecated, .draft, .longform, .nwc_request, .nwc_response, .http_auth, .status, .relay_list:
|
||||
case .contacts, .metadata, .delete, .boost, .chat, .mute_list, .list_deprecated, .draft, .longform, .nwc_request, .nwc_response, .http_auth, .status, .relay_list, .follow_list:
|
||||
return .unknown_or_unsupported_kind
|
||||
}
|
||||
case .naddr(let naddr):
|
||||
|
||||
@@ -73,15 +73,40 @@ struct NoteContentView: View {
|
||||
}
|
||||
|
||||
var preview: LinkViewRepresentable? {
|
||||
guard !blur_images,
|
||||
case .loaded(let preview) = preview_model.state,
|
||||
guard case .loaded(let preview) = preview_model.state,
|
||||
case .value(let cached) = preview else {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
// If either
|
||||
// (1) the blur images setting is enabled
|
||||
// (2) the media previews setting is disabled
|
||||
// (3) this note content view does not display media
|
||||
// then do not show media in the link preview.
|
||||
if blur_images || !damus_state.settings.media_previews || self.options.contains(.no_media) {
|
||||
return linkPreviewWithNoMedia(cached)
|
||||
}
|
||||
|
||||
// If media is already being shown, do not show media in the link preview
|
||||
// to avoid taking up additional screen space.
|
||||
if case let .separated(separated) = note_artifacts, !separated.media.isEmpty && !self.options.contains(.no_media) {
|
||||
return linkPreviewWithNoMedia(cached)
|
||||
}
|
||||
|
||||
return LinkViewRepresentable(meta: .linkmeta(cached))
|
||||
}
|
||||
|
||||
|
||||
// Creates a LinkViewRepresentable without media previews.
|
||||
func linkPreviewWithNoMedia(_ cached: CachedMetadata) -> LinkViewRepresentable? {
|
||||
let linkMetadata = LPLinkMetadata()
|
||||
|
||||
linkMetadata.originalURL = cached.meta.originalURL
|
||||
linkMetadata.title = cached.meta.title
|
||||
linkMetadata.url = cached.meta.url
|
||||
|
||||
return LinkViewRepresentable(meta: .linkmeta(CachedMetadata(meta: linkMetadata)))
|
||||
}
|
||||
|
||||
func truncatedText(content: CompatibleText) -> some View {
|
||||
Group {
|
||||
if truncate_very_short {
|
||||
@@ -108,7 +133,7 @@ struct NoteContentView: View {
|
||||
|
||||
func previewView(links: [URL]) -> some View {
|
||||
Group {
|
||||
if let preview = self.preview, !blur_images {
|
||||
if let preview = self.preview {
|
||||
if let preview_height {
|
||||
preview
|
||||
.frame(height: preview_height)
|
||||
@@ -181,7 +206,7 @@ struct NoteContentView: View {
|
||||
}
|
||||
}
|
||||
|
||||
if damus_state.settings.media_previews, has_previews {
|
||||
if has_previews {
|
||||
if with_padding {
|
||||
previewView(links: artifacts.links).padding(.horizontal)
|
||||
} else {
|
||||
|
||||
@@ -123,7 +123,7 @@ struct ProfileView: View {
|
||||
var filters = ContentFilters.defaults(damus_state: damus_state)
|
||||
filters.append(fstate.filter)
|
||||
switch fstate {
|
||||
case .posts, .posts_and_replies:
|
||||
case .posts, .posts_and_replies, .follow_list:
|
||||
filters.append({ profile.pubkey == $0.pubkey })
|
||||
case .conversations:
|
||||
filters.append({ profile.conversation_events.contains($0.id) } )
|
||||
|
||||
@@ -15,8 +15,9 @@ struct SearchHomeView: View {
|
||||
@State var search: String = ""
|
||||
@FocusState private var isFocused: Bool
|
||||
|
||||
var content_filter: (NostrEvent) -> Bool {
|
||||
let filters = ContentFilters.defaults(damus_state: self.damus_state)
|
||||
func content_filter(_ fstate: FilterState) -> ((NostrEvent) -> Bool) {
|
||||
var filters = ContentFilters.defaults(damus_state: damus_state)
|
||||
filters.append(fstate.filter)
|
||||
return ContentFilters(filters: filters).filter
|
||||
}
|
||||
|
||||
@@ -52,21 +53,20 @@ struct SearchHomeView: View {
|
||||
loading: $model.loading,
|
||||
damus: damus_state,
|
||||
show_friend_icon: true,
|
||||
filter: { ev in
|
||||
if !content_filter(ev) {
|
||||
return false
|
||||
}
|
||||
|
||||
let event_muted = damus_state.mutelist_manager.is_event_muted(ev)
|
||||
if event_muted {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
},
|
||||
filter:content_filter(FilterState.posts),
|
||||
content: {
|
||||
AnyView(VStack {
|
||||
SuggestedHashtagsView(damus_state: damus_state, max_items: 5, events: model.events)
|
||||
AnyView(VStack(alignment: .leading) {
|
||||
HStack {
|
||||
Image(systemName: "sparkles")
|
||||
.foregroundStyle(PinkGradient)
|
||||
Text("Follow Packs", comment: "A label indicating that the items below it are follow packs")
|
||||
.foregroundStyle(PinkGradient)
|
||||
}
|
||||
.padding(.top)
|
||||
.padding(.horizontal)
|
||||
|
||||
FollowPackTimelineView<AnyView>(events: model.events, loading: $model.loading, damus: damus_state, show_friend_icon: true,filter:content_filter(FilterState.follow_list)
|
||||
).padding(.bottom)
|
||||
|
||||
Divider()
|
||||
.frame(height: 1)
|
||||
|
||||
@@ -17,19 +17,29 @@ struct BalanceView: View {
|
||||
Text("Current balance", comment: "Label for displaying current wallet balance")
|
||||
.foregroundStyle(DamusColors.neutral6)
|
||||
if let balance {
|
||||
self.numericalBalanceView(text: NumberFormatter.localizedString(from: NSNumber(integerLiteral: Int(balance)), number: .decimal))
|
||||
NumericalBalanceView(text: NumberFormatter.localizedString(from: NSNumber(integerLiteral: Int(balance)), number: .decimal), hide_balance: $hide_balance)
|
||||
}
|
||||
else {
|
||||
// Make sure we do not show any numeric value to the user when still loading (or when failed to load)
|
||||
// This is important because if we show a numeric value like "zero" when things are not loaded properly, we risk scaring the user into thinking that they have lost funds.
|
||||
self.numericalBalanceView(text: "??")
|
||||
Text(verbatim: "??")
|
||||
.lineLimit(1)
|
||||
.minimumScaleFactor(0.70)
|
||||
.font(.veryVeryLargeTitle)
|
||||
.fontWeight(.heavy)
|
||||
.foregroundStyle(PinkGradient)
|
||||
.redacted(reason: .placeholder)
|
||||
.shimmer(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct NumericalBalanceView: View {
|
||||
let text: String
|
||||
@Binding var hide_balance: Bool
|
||||
|
||||
func numericalBalanceView(text: String) -> some View {
|
||||
var body: some View {
|
||||
Group {
|
||||
if hide_balance {
|
||||
Text(verbatim: "*****")
|
||||
|
||||
246
damus/Views/Wallet/LnurlAmountView.swift
Normal file
246
damus/Views/Wallet/LnurlAmountView.swift
Normal file
@@ -0,0 +1,246 @@
|
||||
//
|
||||
// LnurlAmountView.swift
|
||||
// damus
|
||||
//
|
||||
// Created by Daniel D’Aquino on 2025-06-18
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import Combine
|
||||
|
||||
class LnurlAmountModel: ObservableObject {
|
||||
@Published var custom_amount: String = "0"
|
||||
@Published var custom_amount_sats: Int? = 0
|
||||
@Published var processing: Bool = false
|
||||
@Published var error: String? = nil
|
||||
@Published var invoice: String? = nil
|
||||
@Published var zap_amounts: [ZapAmountItem] = []
|
||||
|
||||
func set_defaults(settings: UserSettingsStore) {
|
||||
let default_amount = settings.default_zap_amount
|
||||
custom_amount = String(default_amount)
|
||||
custom_amount_sats = default_amount
|
||||
zap_amounts = get_zap_amount_items(default_amount)
|
||||
}
|
||||
}
|
||||
|
||||
/// Enables the user to enter a Bitcoin amount to be sent. Based on `CustomizeZapView`.
|
||||
struct LnurlAmountView: View {
|
||||
let damus_state: DamusState
|
||||
let lnurlString: String
|
||||
let onInvoiceFetched: (Invoice) -> Void
|
||||
let onCancel: () -> Void
|
||||
|
||||
@StateObject var model: LnurlAmountModel = LnurlAmountModel()
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
@FocusState var isAmountFocused: Bool
|
||||
|
||||
init(damus_state: DamusState, lnurlString: String, onInvoiceFetched: @escaping (Invoice) -> Void, onCancel: @escaping () -> Void) {
|
||||
self.damus_state = damus_state
|
||||
self.lnurlString = lnurlString
|
||||
self.onInvoiceFetched = onInvoiceFetched
|
||||
self.onCancel = onCancel
|
||||
}
|
||||
|
||||
func AmountButton(zapAmountItem: ZapAmountItem) -> some View {
|
||||
let isSelected = model.custom_amount_sats == zapAmountItem.amount
|
||||
|
||||
return Button(action: {
|
||||
model.custom_amount_sats = zapAmountItem.amount
|
||||
model.custom_amount = String(zapAmountItem.amount)
|
||||
}) {
|
||||
let fmt = format_msats_abbrev(Int64(zapAmountItem.amount) * 1000)
|
||||
Text(verbatim: "\(zapAmountItem.icon)\n\(fmt)")
|
||||
.contentShape(Rectangle())
|
||||
.font(.headline)
|
||||
.frame(width: 70, height: 70)
|
||||
.foregroundColor(DamusColors.adaptableBlack)
|
||||
.background(isSelected ? DamusColors.adaptableWhite : DamusColors.adaptableGrey)
|
||||
.cornerRadius(15)
|
||||
.overlay(RoundedRectangle(cornerRadius: 15)
|
||||
.stroke(DamusColors.purple.opacity(isSelected ? 1.0 : 0.0), lineWidth: 2))
|
||||
}
|
||||
}
|
||||
|
||||
func amount_parts(_ n: Int) -> [ZapAmountItem] {
|
||||
var i: Int = -1
|
||||
let start = n * 4
|
||||
let end = start + 4
|
||||
|
||||
return model.zap_amounts.filter { _ in
|
||||
i += 1
|
||||
return i >= start && i < end
|
||||
}
|
||||
}
|
||||
|
||||
func AmountsPart(n: Int) -> some View {
|
||||
HStack(alignment: .center, spacing: 15) {
|
||||
ForEach(amount_parts(n)) { entry in
|
||||
AmountButton(zapAmountItem: entry)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var AmountGrid: some View {
|
||||
VStack {
|
||||
AmountsPart(n: 0)
|
||||
|
||||
AmountsPart(n: 1)
|
||||
}
|
||||
.padding(10)
|
||||
}
|
||||
|
||||
var CustomAmountTextField: some View {
|
||||
VStack(alignment: .center, spacing: 0) {
|
||||
TextField("", text: $model.custom_amount)
|
||||
.focused($isAmountFocused)
|
||||
.task {
|
||||
self.isAmountFocused = true
|
||||
}
|
||||
.font(.system(size: 72, weight: .heavy))
|
||||
.minimumScaleFactor(0.01)
|
||||
.keyboardType(.numberPad)
|
||||
.multilineTextAlignment(.center)
|
||||
.onChange(of: model.custom_amount) { newValue in
|
||||
if let parsed = handle_string_amount(new_value: newValue) {
|
||||
model.custom_amount = parsed.formatted()
|
||||
model.custom_amount_sats = parsed
|
||||
} else {
|
||||
model.custom_amount = "0"
|
||||
model.custom_amount_sats = nil
|
||||
}
|
||||
}
|
||||
let noun = pluralizedString(key: "sats", count: model.custom_amount_sats ?? 0)
|
||||
Text(noun)
|
||||
.font(.system(size: 18, weight: .heavy))
|
||||
}
|
||||
}
|
||||
|
||||
func fetchInvoice() {
|
||||
guard let amount = model.custom_amount_sats, amount > 0 else {
|
||||
model.error = NSLocalizedString("Please enter a valid amount", comment: "Error message when no valid amount is entered for LNURL payment")
|
||||
return
|
||||
}
|
||||
|
||||
model.processing = true
|
||||
model.error = nil
|
||||
|
||||
Task { @MainActor in
|
||||
// For LNURL payments without zaps, we use nil for zapreq and comment
|
||||
// We just need the invoice for payment
|
||||
let msats = Int64(amount) * 1000
|
||||
|
||||
// First get the payment request from the LNURL
|
||||
guard let payreq = await fetch_static_payreq(lnurlString) else {
|
||||
model.processing = false
|
||||
model.error = NSLocalizedString("Error fetching LNURL payment information", comment: "Error message when LNURL fetch fails")
|
||||
return
|
||||
}
|
||||
|
||||
// Then fetch the invoice with the amount
|
||||
guard let invoiceStr = await fetch_zap_invoice(payreq, zapreq: nil, msats: msats, zap_type: .non_zap, comment: nil) else {
|
||||
model.processing = false
|
||||
model.error = NSLocalizedString("Error fetching lightning invoice", comment: "Error message when there was an error fetching a lightning invoice")
|
||||
return
|
||||
}
|
||||
|
||||
// Decode the invoice to validate it
|
||||
guard let invoice = decode_bolt11(invoiceStr) else {
|
||||
model.processing = false
|
||||
model.error = NSLocalizedString("Invalid lightning invoice received", comment: "Error message when the lightning invoice received from LNURL is invalid")
|
||||
return
|
||||
}
|
||||
|
||||
// All good, pass the invoice back to the parent view
|
||||
model.processing = false
|
||||
onInvoiceFetched(invoice)
|
||||
}
|
||||
}
|
||||
|
||||
var PayButton: some View {
|
||||
VStack {
|
||||
if model.processing {
|
||||
Text("Processing...", comment: "Text to indicate that the app is in the process of fetching an invoice.")
|
||||
.padding()
|
||||
ProgressView()
|
||||
} else {
|
||||
Button(action: {
|
||||
fetchInvoice()
|
||||
}) {
|
||||
HStack {
|
||||
Text("Continue", comment: "Button to proceed with LNURL payment process.")
|
||||
.font(.system(size: 20, weight: .bold))
|
||||
}
|
||||
.frame(minWidth: 300, maxWidth: .infinity, alignment: .center)
|
||||
}
|
||||
.buttonStyle(GradientButtonStyle())
|
||||
.disabled(model.custom_amount_sats == 0 || model.custom_amount == "0")
|
||||
.opacity(model.custom_amount_sats == 0 || model.custom_amount == "0" ? 0.5 : 1.0)
|
||||
.padding(10)
|
||||
}
|
||||
|
||||
if let error = model.error {
|
||||
Text(error)
|
||||
.foregroundColor(.red)
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var CancelButton: some View {
|
||||
Button(action: onCancel) {
|
||||
HStack {
|
||||
Text("Cancel", comment: "Button to cancel the LNURL payment process.")
|
||||
.font(.headline)
|
||||
.padding()
|
||||
}
|
||||
.frame(minWidth: 300, maxWidth: .infinity, alignment: .center)
|
||||
}
|
||||
.buttonStyle(NeutralButtonStyle())
|
||||
.padding()
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .center, spacing: 20) {
|
||||
ScrollView {
|
||||
VStack {
|
||||
Text("Enter Amount", comment: "Header text for LNURL payment amount entry screen")
|
||||
.font(.title)
|
||||
.fontWeight(.bold)
|
||||
.padding()
|
||||
|
||||
Text("How much would you like to send?", comment: "Instruction text for LNURL payment amount")
|
||||
.font(.headline)
|
||||
.multilineTextAlignment(.center)
|
||||
.padding(.bottom)
|
||||
|
||||
CustomAmountTextField
|
||||
|
||||
AmountGrid
|
||||
|
||||
PayButton
|
||||
|
||||
CancelButton
|
||||
}
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
model.set_defaults(settings: damus_state.settings)
|
||||
}
|
||||
.onTapGesture {
|
||||
hideKeyboard()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct LnurlAmountView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
LnurlAmountView(
|
||||
damus_state: test_damus_state,
|
||||
lnurlString: "lnurl1dp68gurn8ghj7um9wfmxjcm99e3k7mf0v9cxj0m385ekvcenxc6r2c35xvukxefcv5mkvv34x5ekzd3ev56nyd3hxqurzepexejxxepnxscrvwfnv9nxzcn9xq6xyefhvgcxxcmyxymnserxfq5fns",
|
||||
onInvoiceFetched: { _ in },
|
||||
onCancel: {}
|
||||
)
|
||||
.frame(width: 400, height: 600)
|
||||
}
|
||||
}
|
||||
375
damus/Views/Wallet/SendPaymentView.swift
Normal file
375
damus/Views/Wallet/SendPaymentView.swift
Normal file
@@ -0,0 +1,375 @@
|
||||
//
|
||||
// SendPaymentView.swift
|
||||
// damus
|
||||
//
|
||||
// Created by Daniel D’Aquino on 2025-06-13.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import CodeScanner
|
||||
|
||||
fileprivate let SEND_PAYMENT_TIMEOUT: Duration = .seconds(10)
|
||||
|
||||
/// A view that allows a user to pay a lightning invoice
|
||||
struct SendPaymentView: View {
|
||||
|
||||
// MARK: - Helper structures
|
||||
|
||||
/// Represents the state of the invoice payment process
|
||||
enum SendState {
|
||||
case enterInvoice(scannerMessage: String?)
|
||||
case confirmPayment(invoice: Invoice)
|
||||
case enterLnurlAmount(lnurl: String)
|
||||
case processing
|
||||
case completed
|
||||
case failed(error: HumanReadableError)
|
||||
}
|
||||
|
||||
typealias HumanReadableError = ErrorView.UserPresentableError
|
||||
|
||||
|
||||
// MARK: - Immutable members
|
||||
|
||||
let damus_state: DamusState
|
||||
let model: WalletModel
|
||||
let nwc: WalletConnectURL
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
|
||||
// MARK: - State management
|
||||
|
||||
@State private var sendState: SendState = .enterInvoice(scannerMessage: nil) {
|
||||
didSet {
|
||||
switch sendState {
|
||||
case .enterInvoice, .confirmPayment, .processing, .enterLnurlAmount:
|
||||
break
|
||||
case .completed:
|
||||
// Refresh wallet to reflect new balance after payment
|
||||
Task { await WalletConnect.refresh_wallet_information(damus_state: damus_state) }
|
||||
case .failed:
|
||||
// Even when a wallet says it has failed, update balance just in case it is a false negative,
|
||||
// This might prevent the user from accidentally sending a payment twice in case of a bug.
|
||||
Task { await WalletConnect.refresh_wallet_information(damus_state: damus_state) }
|
||||
}
|
||||
}
|
||||
}
|
||||
var isShowingScanner: Bool {
|
||||
if case .enterInvoice = sendState { true } else { false }
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Views
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .center) {
|
||||
switch sendState {
|
||||
case .enterInvoice(let scannerMessage):
|
||||
invoiceInputView(scannerMessage: scannerMessage)
|
||||
.padding(40)
|
||||
case .confirmPayment(let invoice):
|
||||
confirmationView(invoice: invoice)
|
||||
.padding(40)
|
||||
case .enterLnurlAmount(let lnurl):
|
||||
LnurlAmountView(
|
||||
damus_state: damus_state,
|
||||
lnurlString: lnurl,
|
||||
onInvoiceFetched: { invoice in
|
||||
sendState = .confirmPayment(invoice: invoice)
|
||||
},
|
||||
onCancel: {
|
||||
sendState = .enterInvoice(scannerMessage: nil)
|
||||
}
|
||||
)
|
||||
case .processing:
|
||||
processingView
|
||||
.padding(40)
|
||||
case .completed:
|
||||
completedView
|
||||
.padding(40)
|
||||
case .failed(error: let error):
|
||||
failedView(error: error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func invoiceInputView(scannerMessage: String?) -> some View {
|
||||
VStack(spacing: 20) {
|
||||
Text("Scan Lightning Invoice", comment: "Title for the invoice scanning screen")
|
||||
.font(.title2)
|
||||
.bold()
|
||||
|
||||
CodeScannerView(
|
||||
codeTypes: [.qr],
|
||||
scanMode: .continuous,
|
||||
showViewfinder: true, // The scan only seems to work if it fits the bounding box, so let's make this visible to hint that to the users
|
||||
simulatedData: "lightning:lnbc100n1p357sl0sp5t9n56wdztun39lgdqlr30xqwksg3k69q4q2rkr52aplujw0esn0qpp5mrqgljk62z20q4nvgr6lzcyn6fhylzccwdvu4k77apg3zmrkujjqdpzw35xjueqd9ejqcfqv3jhxcmjd9c8g6t0dcxqyjw5qcqpjrzjqt56h4gvp5yx36u2uzqa6qwcsk3e2duunfxppzj9vhypc3wfe2wswz607uqq3xqqqsqqqqqqqqqqqlqqyg9qyysgqagx5h20aeulj3gdwx3kxs8u9f4mcakdkwuakasamm9562ffyr9en8yg20lg0ygnr9zpwp68524kmda0t5xp2wytex35pu8hapyjajxqpsql29r",
|
||||
completion: handleScan
|
||||
)
|
||||
.frame(height: 300)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 20))
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 20)
|
||||
.stroke(Color.accentColor, lineWidth: 2)
|
||||
)
|
||||
.padding(.horizontal)
|
||||
|
||||
VStack(spacing: 15) {
|
||||
Button(action: {
|
||||
if let pastedInvoice = getPasteboardContent() {
|
||||
processUserInput(pastedInvoice)
|
||||
}
|
||||
}) {
|
||||
HStack {
|
||||
Image(systemName: "doc.on.clipboard")
|
||||
Text("Paste from Clipboard", comment: "Button to paste invoice from clipboard")
|
||||
}
|
||||
.frame(minWidth: 250, maxWidth: .infinity, alignment: .center)
|
||||
.padding()
|
||||
}
|
||||
.buttonStyle(NeutralButtonStyle())
|
||||
.accessibilityLabel(NSLocalizedString("Paste invoice from clipboard", comment: "Accessibility label for the invoice paste button"))
|
||||
}
|
||||
.padding(.horizontal)
|
||||
|
||||
if let scannerMessage {
|
||||
Text(scannerMessage)
|
||||
.foregroundColor(.secondary)
|
||||
.padding(.top, 10)
|
||||
.multilineTextAlignment(.center)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
|
||||
func confirmationView(invoice: Invoice) -> some View {
|
||||
let insufficientFunds: Bool = (invoice.amount.amount_sats() ?? 0) > (model.balance ?? 0)
|
||||
return VStack(spacing: 20) {
|
||||
Text("Confirm Payment", comment: "Title for payment confirmation screen")
|
||||
.font(.title2)
|
||||
.bold()
|
||||
|
||||
VStack(spacing: 15) {
|
||||
Text("Amount", comment: "Label for invoice payment amount in confirmation screen")
|
||||
.font(.headline)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
if case .specific(let amount) = invoice.amount {
|
||||
NumericalBalanceView(text: NumberFormatter.localizedString(from: NSNumber(value: (Double(amount) / 1000.0)), number: .decimal), hide_balance: .constant(false))
|
||||
}
|
||||
|
||||
Text("Bolt11 Invoice", comment: "Label for the bolt11 invoice string in confirmation screen")
|
||||
.font(.headline)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
Text(verbatim: invoice.abbreviated)
|
||||
.font(.system(.body, design: .monospaced))
|
||||
.padding()
|
||||
.background(DamusColors.adaptableGrey)
|
||||
.cornerRadius(10)
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
|
||||
HStack(spacing: 15) {
|
||||
Button(action: {
|
||||
sendState = .enterInvoice(scannerMessage: nil)
|
||||
}) {
|
||||
Text("Back", comment: "Button to go back to invoice input")
|
||||
.font(.headline)
|
||||
.frame(minWidth: 140)
|
||||
.padding()
|
||||
}
|
||||
.buttonStyle(NeutralButtonStyle())
|
||||
|
||||
Button(action: {
|
||||
sendState = .processing
|
||||
|
||||
// Process payment
|
||||
guard let payRequestEv = WalletConnect.pay(url: nwc, pool: damus_state.nostrNetwork.pool, post: damus_state.nostrNetwork.postbox, invoice: invoice.string, zap_request: nil, delay: nil) else {
|
||||
sendState = .failed(error: .init(
|
||||
user_visible_description: NSLocalizedString("The payment request could not be made to your wallet provider.", comment: "A human-readable error message"),
|
||||
tip: NSLocalizedString("Check if your wallet looks configured correctly and try again. If the error persists, please contact support.", comment: "A human-readable tip for an error when a payment request cannot be made to a wallet."),
|
||||
technical_info: "Cannot form Nostr Event to send to the NWC provider when calling `pay` from the \"send payment\" feature. Wallet provider relay: \"\(nwc.relay)\""
|
||||
))
|
||||
return
|
||||
}
|
||||
Task {
|
||||
do {
|
||||
let result = try await model.waitForResponse(for: payRequestEv.id, timeout: SEND_PAYMENT_TIMEOUT)
|
||||
guard case .pay_invoice(_) = result else {
|
||||
sendState = .failed(error: .init(
|
||||
user_visible_description: NSLocalizedString("Received an incorrect or unexpected response from the wallet provider. This looks like an issue with your wallet provider.", comment: "A human-readable error message"),
|
||||
tip: NSLocalizedString("Try again. If the error persists, please contact your wallet provider and/or our support team.", comment: "A human-readable tip for an error when a payment request cannot be made to a wallet."),
|
||||
technical_info: "Expected a `pay_invoice` response for the request, but received a different type of response from the NWC wallet provider. Wallet provider relay: \"\(nwc.relay)\""
|
||||
))
|
||||
return
|
||||
}
|
||||
sendState = .completed
|
||||
}
|
||||
catch {
|
||||
if let error = error as? WalletModel.WaitError {
|
||||
switch error {
|
||||
case .timeout:
|
||||
sendState = .failed(error: .init(
|
||||
user_visible_description: NSLocalizedString("The payment request did not receive a response and the request timed-out.", comment: "A human-readable error message"),
|
||||
tip: NSLocalizedString("Check if the invoice is valid, your wallet is online, configured correctly, and try again. If the error persists, please contact support and/or your wallet provider.", comment: "A human-readable tip guiding the user on what to do when seeing a timeout error while sending a wallet payment."),
|
||||
technical_info: "Payment request timed-out. Wallet provider relay: \"\(nwc.relay)\""
|
||||
))
|
||||
}
|
||||
}
|
||||
else if let error = error as? WalletConnect.WalletResponseErr,
|
||||
let humanReadableError = error.humanReadableError {
|
||||
sendState = .failed(error: humanReadableError)
|
||||
}
|
||||
else {
|
||||
sendState = .failed(error: .init(
|
||||
user_visible_description: NSLocalizedString("An unexpected error occurred.", comment: "A human-readable error message"),
|
||||
tip: NSLocalizedString("Please try again. If the error persists, please contact support.", comment: "A human-readable tip guiding the user on what to do when seeing an unexpected error while sending a wallet payment."),
|
||||
technical_info: "Unexpected error thrown while waiting for payment request response. Wallet provider relay: \"\(nwc.relay)\"; Error: \(error)"
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
}) {
|
||||
Text("Confirm", comment: "Button to confirm payment")
|
||||
.font(.headline)
|
||||
.frame(minWidth: 140)
|
||||
.padding()
|
||||
}
|
||||
.buttonStyle(GradientButtonStyle(padding: 0))
|
||||
.disabled(insufficientFunds)
|
||||
.opacity(insufficientFunds ? 0.5 : 1.0)
|
||||
}
|
||||
|
||||
if insufficientFunds {
|
||||
Text("You do not have enough funds to pay for this invoice.", comment: "Label on invoice payment screen, indicating user has insufficient funds")
|
||||
.foregroundColor(.secondary)
|
||||
.padding(.top, 10)
|
||||
.multilineTextAlignment(.center)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
|
||||
var processingView: some View {
|
||||
VStack(spacing: 30) {
|
||||
Text("Processing Payment", comment: "Title for payment processing screen")
|
||||
.font(.title2)
|
||||
.bold()
|
||||
|
||||
ProgressView()
|
||||
.scaleEffect(1.5)
|
||||
.padding()
|
||||
|
||||
Text("Please wait while your payment is being processed…", comment: "Message while payment is being processed")
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundStyle(.secondary)
|
||||
.padding()
|
||||
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
|
||||
var completedView: some View {
|
||||
VStack(spacing: 30) {
|
||||
Image(systemName: "checkmark.circle.fill")
|
||||
.resizable()
|
||||
.frame(width: 80, height: 80)
|
||||
.foregroundColor(.green)
|
||||
|
||||
Text("Payment Sent!", comment: "Title for successful payment screen")
|
||||
.font(.title2)
|
||||
.bold()
|
||||
|
||||
Text("Your payment has been successfully sent.", comment: "Message for successful payment")
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundStyle(.secondary)
|
||||
.padding()
|
||||
|
||||
Button(action: {
|
||||
dismiss()
|
||||
}) {
|
||||
Text("Done", comment: "Button to dismiss successful payment screen")
|
||||
.font(.headline)
|
||||
.frame(minWidth: 200)
|
||||
}
|
||||
.buttonStyle(GradientButtonStyle())
|
||||
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
|
||||
func failedView(error: HumanReadableError) -> some View {
|
||||
ScrollView {
|
||||
VStack {
|
||||
ErrorView(damus_state: damus_state, error: error)
|
||||
|
||||
Button(action: {
|
||||
sendState = .enterInvoice(scannerMessage: nil)
|
||||
}) {
|
||||
Text("Try Again", comment: "Button to retry payment")
|
||||
.font(.headline)
|
||||
.frame(minWidth: 200)
|
||||
.padding()
|
||||
}
|
||||
.buttonStyle(GradientButtonStyle(padding: 0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func handleScan(result: Result<ScanResult, ScanError>) {
|
||||
switch result {
|
||||
case .success(let result):
|
||||
processUserInput(result.string)
|
||||
case .failure(let error):
|
||||
sendState = .enterInvoice(scannerMessage: NSLocalizedString("Failed to scan QR code, please try again.", comment: "Error message for failed QR scan"))
|
||||
}
|
||||
}
|
||||
|
||||
func processUserInput(_ text: String) {
|
||||
if let result = parseScanData(text) {
|
||||
switch result {
|
||||
case .invoice(let invoice):
|
||||
if invoice.amount == .any {
|
||||
sendState = .enterInvoice(scannerMessage: NSLocalizedString("Sorry, we do not support paying invoices without amount yet. Please scan an invoice with an amount.", comment: "A user-readable message indicating that the lightning invoice they scanned or pasted is not supported and is missing an amount."))
|
||||
} else {
|
||||
sendState = .confirmPayment(invoice: invoice)
|
||||
}
|
||||
case .lnurl(let lnurlString):
|
||||
sendState = .enterLnurlAmount(lnurl: lnurlString)
|
||||
}
|
||||
} else {
|
||||
sendState = .enterInvoice(scannerMessage: NSLocalizedString("This does not appear to be a valid Lightning invoice or LNURL.", comment: "A user-readable message indicating that the scanned or pasted content was not a valid lightning invoice or LNURL."))
|
||||
}
|
||||
}
|
||||
|
||||
func parseScanData(_ text: String) -> ScanData? {
|
||||
let processedString = text.trimmingCharacters(in: .whitespacesAndNewlines).lowercased()
|
||||
|
||||
if let invoice = Invoice.from(string: processedString) {
|
||||
return .invoice(invoice)
|
||||
}
|
||||
|
||||
if let _ = processedString.range(of: "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", options: .regularExpression) {
|
||||
guard let lnurl = lnaddress_to_lnurl(processedString) else { return nil }
|
||||
return .lnurl(lnurl)
|
||||
}
|
||||
|
||||
if processedString.hasPrefix("lnurl") {
|
||||
return .lnurl(processedString)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
enum ScanData {
|
||||
case invoice(Invoice)
|
||||
case lnurl(String)
|
||||
}
|
||||
|
||||
// Helper function to get pasteboard content
|
||||
func getPasteboardContent() -> String? {
|
||||
return UIPasteboard.general.string
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ let WALLET_WARNING_THRESHOLD: UInt64 = 100000
|
||||
struct WalletView: View {
|
||||
let damus_state: DamusState
|
||||
@State var show_settings: Bool = false
|
||||
@State var show_send_sheet: Bool = false
|
||||
@ObservedObject var model: WalletModel
|
||||
@ObservedObject var settings: UserSettingsStore
|
||||
@State private var showBalance: Bool = false
|
||||
@@ -59,6 +60,19 @@ struct WalletView: View {
|
||||
VStack(spacing: 5) {
|
||||
|
||||
BalanceView(balance: model.balance, hide_balance: $settings.hide_wallet_balance)
|
||||
|
||||
Button(action: {
|
||||
show_send_sheet = true
|
||||
}) {
|
||||
HStack {
|
||||
Image(systemName: "paperplane.fill")
|
||||
Text("Send", comment: "Button label to send bitcoin payment from wallet")
|
||||
.font(.headline)
|
||||
}
|
||||
.padding(.horizontal, 10)
|
||||
}
|
||||
.buttonStyle(GradientButtonStyle())
|
||||
.padding(.bottom, 20)
|
||||
|
||||
TransactionsView(damus_state: damus_state, transactions: model.transactions, hide_balance: $settings.hide_wallet_balance)
|
||||
}
|
||||
@@ -104,23 +118,17 @@ struct WalletView: View {
|
||||
.presentationDragIndicator(.visible)
|
||||
.presentationDetents([.large])
|
||||
}
|
||||
.sheet(isPresented: $show_send_sheet) {
|
||||
SendPaymentView(damus_state: damus_state, model: model, nwc: nwc)
|
||||
.presentationDragIndicator(.visible)
|
||||
.presentationDetents([.large])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
func updateWalletInformation() async {
|
||||
guard let url = damus_state.settings.nostr_wallet_connect,
|
||||
let nwc = WalletConnectURL(str: url) else {
|
||||
return
|
||||
}
|
||||
|
||||
let flusher: OnFlush? = nil
|
||||
|
||||
let delay = 0.0 // We don't need a delay when fetching a transaction list or balance
|
||||
|
||||
WalletConnect.request_transaction_list(url: nwc, pool: damus_state.nostrNetwork.pool, post: damus_state.nostrNetwork.postbox, delay: delay, on_flush: flusher)
|
||||
WalletConnect.request_balance_information(url: nwc, pool: damus_state.nostrNetwork.pool, post: damus_state.nostrNetwork.postbox, delay: delay, on_flush: flusher)
|
||||
return
|
||||
await WalletConnect.update_wallet_information(damus_state: damus_state)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,22 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>follow_pack_user_count</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@FOLLOW_PACK_USERS@</string>
|
||||
<key>FOLLOW_PACK_USERS</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>d</string>
|
||||
<key>one</key>
|
||||
<string>user</string>
|
||||
<key>other</key>
|
||||
<string>users</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>followed_by_three_and_others</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 http://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd">
|
||||
<file original="damus/en-US.lproj/InfoPlist.strings" source-language="en-US" target-language="en-US" datatype="plaintext">
|
||||
<header>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="16.3" build-num="16E140"/>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="16.4" build-num="16F6"/>
|
||||
</header>
|
||||
<body>
|
||||
<trans-unit id="CFBundleDisplayName" xml:space="preserve">
|
||||
@@ -44,7 +44,7 @@
|
||||
</file>
|
||||
<file original="damus/en-US.lproj/Localizable.strings" source-language="en-US" target-language="en-US" datatype="plaintext">
|
||||
<header>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="16.3" build-num="16E140"/>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="16.4" build-num="16F6"/>
|
||||
</header>
|
||||
<body>
|
||||
<trans-unit id="#%@" xml:space="preserve">
|
||||
@@ -57,6 +57,7 @@
|
||||
<target>%@ %@</target>
|
||||
<note>Sentence composed of 2 variables to describe how many imports were performed from loading a NostrScript. In source English, the first variable is the number of imports, and the second variable is 'Import' or 'Imports'.
|
||||
Sentence composed of 2 variables to describe how many people are following a user. In source English, the first variable is the number of followers, and the second variable is 'Follower' or 'Followers'.
|
||||
Sentence composed of 2 variables to describe how many people are in the follow pack. In source English, the first variable is the number of users, and the second variable is 'user' or 'users'.
|
||||
Sentence composed of 2 variables to describe how many profiles a user is following. In source English, the first variable is the number of profiles being followed, and the second variable is 'Following'.
|
||||
Sentence composed of 2 variables to describe how many quoted reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'.
|
||||
Sentence composed of 2 variables to describe how many reactions there are on a post. In source English, the first variable is the number of reactions, and the second variable is 'Reaction' or 'Reactions'.
|
||||
@@ -280,7 +281,7 @@ Title text to indicate user to an add a relay.</note>
|
||||
<trans-unit id="All" xml:space="preserve">
|
||||
<source>All</source>
|
||||
<target>All</target>
|
||||
<note>Human-readable short description of the 'friends filter' when it is set to 'all'
|
||||
<note>Human-readable short description of the 'trusted network filter' when it is disabled, and therefore is showing all content.
|
||||
Label for filter for all notifications.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="All recent notes" xml:space="preserve">
|
||||
@@ -789,6 +790,11 @@ Context menu option for copying the version of damus.</note>
|
||||
<target>Create new wallet</target>
|
||||
<note>Button text for creating a new wallet.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Created by %@" xml:space="preserve">
|
||||
<source>Created by %@</source>
|
||||
<target>Created by %@</target>
|
||||
<note>Lets the user know who created this follow pack.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Current balance" xml:space="preserve">
|
||||
<source>Current balance</source>
|
||||
<target>Current balance</target>
|
||||
@@ -1116,6 +1122,11 @@ Section header for first aid tools and settings</note>
|
||||
<target>Follow Back</target>
|
||||
<note>Button to follow a user back.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Follow Packs" xml:space="preserve">
|
||||
<source>Follow Packs</source>
|
||||
<target>Follow Packs</target>
|
||||
<note>A label indicating that the items below it are follow packs</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Follow hashtag" xml:space="preserve">
|
||||
<source>Follow hashtag</source>
|
||||
<target>Follow hashtag</target>
|
||||
@@ -1198,11 +1209,6 @@ My side interests include languages and I am striving to be a #polyglot - I am a
|
||||
<target>Free</target>
|
||||
<note>Dropdown option for selecting Free plan for DeepL translation service.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Friends of friends" xml:space="preserve">
|
||||
<source>Friends of friends</source>
|
||||
<target>Friends of friends</target>
|
||||
<note>Human-readable short description of the 'friends filter' when it is set to 'friends-of-friends'</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="General" xml:space="preserve">
|
||||
<source>General</source>
|
||||
<target>General</target>
|
||||
@@ -1288,6 +1294,11 @@ This is my first post on Damus, I am happy to meet you all 🤙. What’s up?
|
||||
<target>Hide all 🤙's</target>
|
||||
<note>Section footer describing OnlyZaps mode</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Hide balance" xml:space="preserve">
|
||||
<source>Hide balance</source>
|
||||
<target>Hide balance</target>
|
||||
<note>Setting to hide wallet balance.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Hide notes with #nsfw tags" xml:space="preserve">
|
||||
<source>Hide notes with #nsfw tags</source>
|
||||
<target>Hide notes with #nsfw tags</target>
|
||||
@@ -1707,6 +1718,11 @@ User confirm No</note>
|
||||
<target>No contact list was found. You might experience issues using the app. If you suspect you have permanently lost your contact list (or if you never had one), you can fix this by resetting it</target>
|
||||
<note>Section footer for Contact list first aid tools</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="No cover image" xml:space="preserve">
|
||||
<source>No cover image</source>
|
||||
<target>No cover image</target>
|
||||
<note>Text letting user know there is no cover image.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="No image is currently setup" xml:space="preserve">
|
||||
<source>No image is currently setup</source>
|
||||
<target>No image is currently setup</target>
|
||||
@@ -1830,6 +1846,21 @@ Label for filter for seeing only notes (instead of notes and replies).</note>
|
||||
<target>Notes & Replies</target>
|
||||
<note>Label for filter for seeing notes and replies (instead of only notes).</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Notes from %@" xml:space="preserve">
|
||||
<source>Notes from %@</source>
|
||||
<target>Notes from %@</target>
|
||||
<note>Text to indicate that notes from one pubkey in our trusted network are shown below.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Notes from %@ & %@" xml:space="preserve">
|
||||
<source>Notes from %1$@ & %2$@</source>
|
||||
<target>Notes from %1$@ & %2$@</target>
|
||||
<note>Text to indicate that notes from two pubkeys in our trusted network are shown below.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Notes from %@, %@ & %@" xml:space="preserve">
|
||||
<source>Notes from %1$@, %2$@ & %3$@</source>
|
||||
<target>Notes from %1$@, %2$@ & %3$@</target>
|
||||
<note>Text to indicate that notes from three pubkeys in our trusted network are shown below.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Notes with the #nsfw tag usually contains adult content or other "Not safe for work" content" xml:space="preserve">
|
||||
<source>Notes with the #nsfw tag usually contains adult content or other "Not safe for work" content</source>
|
||||
<target>Notes with the #nsfw tag usually contains adult content or other "Not safe for work" content</target>
|
||||
@@ -1965,7 +1996,8 @@ Button label to dismiss an error dialog</note>
|
||||
<trans-unit id="People" xml:space="preserve">
|
||||
<source>People</source>
|
||||
<target>People</target>
|
||||
<note>Label for filter for seeing only people follows.</note>
|
||||
<note>Label for filter for seeing only people follows.
|
||||
Label for filter for seeing the people in this follow pack.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="People will be able to send you cash from your profile. No money goes to Damus." xml:space="preserve">
|
||||
<source>People will be able to send you cash from your profile. No money goes to Damus.</source>
|
||||
@@ -2088,6 +2120,11 @@ Section title for deleting the user</note>
|
||||
<target>Posting</target>
|
||||
<note>Title indicating that the highlight post is being published to the network</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Posts" xml:space="preserve">
|
||||
<source>Posts</source>
|
||||
<target>Posts</target>
|
||||
<note>Label for filter for seeing the posts from the people in this follow pack.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Private" xml:space="preserve">
|
||||
<source>Private</source>
|
||||
<target>Private</target>
|
||||
@@ -2286,6 +2323,11 @@ Title of relays view</note>
|
||||
<target>Repair relay list</target>
|
||||
<note>Button to repair relay list.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Replies outside your trusted network" xml:space="preserve">
|
||||
<source>Replies outside your trusted network</source>
|
||||
<target>Replies outside your trusted network</target>
|
||||
<note>Section title in thread for replies from outside of the current user's trusted network, which is their follows and follows of follows.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reply" xml:space="preserve">
|
||||
<source>Reply</source>
|
||||
<target>Reply</target>
|
||||
@@ -2372,6 +2414,11 @@ Setting to enable Repost Local Notification</note>
|
||||
<target>Reset contact list</target>
|
||||
<note>Button to reset contact list.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reset tips on launch" xml:space="preserve">
|
||||
<source>Reset tips on launch</source>
|
||||
<target>Reset tips on launch</target>
|
||||
<note>Developer mode setting to reset tips upon app first launch. Tips are visual contextual hints that highlight new, interesting, or unused features users have not discovered yet.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Retry" xml:space="preserve">
|
||||
<source>Retry</source>
|
||||
<target>Retry</target>
|
||||
@@ -2646,6 +2693,11 @@ Button to show more of a long profile description.</note>
|
||||
<target>Show profile action sheets</target>
|
||||
<note>Setting to show profile action sheets when clicking on a user's profile picture</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show replies from your trusted network first" xml:space="preserve">
|
||||
<source>Show replies from your trusted network first</source>
|
||||
<target>Show replies from your trusted network first</target>
|
||||
<note>Setting to show replies in threads from the current user's trusted network first.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show wallet selector" xml:space="preserve">
|
||||
<source>Show wallet selector</source>
|
||||
<target>Show wallet selector</target>
|
||||
@@ -2945,6 +2997,16 @@ Nice to meet you all! #introductions #plebchain </target>
|
||||
<target>Toggle key visibility</target>
|
||||
<note>Accessibility label for toggling the visibility of the private key input field</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Toggle visibility of content from outside your trusted network" xml:space="preserve">
|
||||
<source>Toggle visibility of content from outside your trusted network</source>
|
||||
<target>Toggle visibility of content from outside your trusted network</target>
|
||||
<note>Title of tip that informs users what trusted network means and that they can toggle the visibility of content from outside their trusted network.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Toggle visibility of replies from outside your trusted network" xml:space="preserve">
|
||||
<source>Toggle visibility of replies from outside your trusted network</source>
|
||||
<target>Toggle visibility of replies from outside your trusted network</target>
|
||||
<note>Title of tip that informs users what trusted network means and that they can toggle the visibility of threaded replies from outside their trusted network.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Top Zap" xml:space="preserve">
|
||||
<source>Top Zap</source>
|
||||
<target>Top Zap</target>
|
||||
@@ -2991,6 +3053,11 @@ Section header for text and appearance settings</note>
|
||||
<target>Truncate timeline text</target>
|
||||
<note>Setting to truncate text in timeline</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Trusted Network" xml:space="preserve">
|
||||
<source>Trusted Network</source>
|
||||
<target>Trusted Network</target>
|
||||
<note>Human-readable short description of the 'trusted network filter' when it is enabled, and therefore showing content from only the trusted network.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Try checking the link again, your internet connection, or contact the person who provided you the link for help." xml:space="preserve">
|
||||
<source>Try checking the link again, your internet connection, or contact the person who provided you the link for help.</source>
|
||||
<target>Try checking the link again, your internet connection, or contact the person who provided you the link for help.</target>
|
||||
@@ -3071,7 +3138,8 @@ Example URL to LibreTranslate server</note>
|
||||
<trans-unit id="Untitled" xml:space="preserve">
|
||||
<source>Untitled</source>
|
||||
<target>Untitled</target>
|
||||
<note>Title of longform event if it is untitled.</note>
|
||||
<note>Title of follow list event if it is untitled.
|
||||
Title of longform event if it is untitled.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Update" xml:space="preserve">
|
||||
<source>Update</source>
|
||||
@@ -3427,6 +3495,11 @@ User confirm Yes</note>
|
||||
<target>Your transaction quota has been exceeded.</target>
|
||||
<note>Error description for quota exceeded</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Your trusted network is comprised of profiles you follow and profiles that they follow." xml:space="preserve">
|
||||
<source>Your trusted network is comprised of profiles you follow and profiles that they follow.</source>
|
||||
<target>Your trusted network is comprised of profiles you follow and profiles that they follow.</target>
|
||||
<note>Description of the tip that informs users what trusted network means.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Your wallet does not have sufficient balance for this transaction." xml:space="preserve">
|
||||
<source>Your wallet does not have sufficient balance for this transaction.</source>
|
||||
<target>Your wallet does not have sufficient balance for this transaction.</target>
|
||||
@@ -3720,9 +3793,24 @@ String indicating that a given timestamp just occurred</note>
|
||||
</file>
|
||||
<file original="damus/en-US.lproj/Localizable.stringsdict" source-language="en-US" target-language="en-US" datatype="plaintext">
|
||||
<header>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="16.3" build-num="16E140"/>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="16.4" build-num="16F6"/>
|
||||
</header>
|
||||
<body>
|
||||
<trans-unit id="/follow_pack_user_count:dict/FOLLOW_PACK_USERS:dict/one:dict/:string" xml:space="preserve">
|
||||
<source>user</source>
|
||||
<target>user</target>
|
||||
<note/>
|
||||
</trans-unit>
|
||||
<trans-unit id="/follow_pack_user_count:dict/FOLLOW_PACK_USERS:dict/other:dict/:string" xml:space="preserve">
|
||||
<source>users</source>
|
||||
<target>users</target>
|
||||
<note/>
|
||||
</trans-unit>
|
||||
<trans-unit id="/follow_pack_user_count:dict/NSStringLocalizedFormatKey:dict/:string" xml:space="preserve">
|
||||
<source>%#@FOLLOW_PACK_USERS@</source>
|
||||
<target>%#@FOLLOW_PACK_USERS@</target>
|
||||
<note/>
|
||||
</trans-unit>
|
||||
<trans-unit id="/followed_by_three_and_others:dict/NSStringLocalizedFormatKey:dict/:string" xml:space="preserve">
|
||||
<source>%#@OTHERS@</source>
|
||||
<target>%#@OTHERS@</target>
|
||||
@@ -3798,6 +3886,21 @@ String indicating that a given timestamp just occurred</note>
|
||||
<target>%#@IMPORTS@</target>
|
||||
<note/>
|
||||
</trans-unit>
|
||||
<trans-unit id="/notes_from_three_and_others:dict/NSStringLocalizedFormatKey:dict/:string" xml:space="preserve">
|
||||
<source>%#@OTHERS@</source>
|
||||
<target>%#@OTHERS@</target>
|
||||
<note/>
|
||||
</trans-unit>
|
||||
<trans-unit id="/notes_from_three_and_others:dict/OTHERS:dict/one:dict/:string" xml:space="preserve">
|
||||
<source>Notes from %2$@, %3$@, %4$@ & %1$d other in your trusted network</source>
|
||||
<target>Notes from %2$@, %3$@, %4$@ & %1$d other in your trusted network</target>
|
||||
<note/>
|
||||
</trans-unit>
|
||||
<trans-unit id="/notes_from_three_and_others:dict/OTHERS:dict/other:dict/:string" xml:space="preserve">
|
||||
<source>Notes from %2$@, %3$@, %4$@ & %1$d others in your trusted network</source>
|
||||
<target>Notes from %2$@, %3$@, %4$@ & %1$d others in your trusted network</target>
|
||||
<note/>
|
||||
</trans-unit>
|
||||
<trans-unit id="/people_reposted_count:dict/NSStringLocalizedFormatKey:dict/:string" xml:space="preserve">
|
||||
<source>%#@REPOSTED@</source>
|
||||
<target>%#@REPOSTED@</target>
|
||||
@@ -4132,7 +4235,7 @@ String indicating that a given timestamp just occurred</note>
|
||||
</file>
|
||||
<file original="damus/InfoPlist.xcstrings" source-language="en-US" target-language="en-US" datatype="plaintext">
|
||||
<header>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="16.3" build-num="16E140"/>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="16.4" build-num="16F6"/>
|
||||
</header>
|
||||
<body>
|
||||
<trans-unit id="CFBundleDisplayName" xml:space="preserve">
|
||||
@@ -4154,7 +4257,7 @@ String indicating that a given timestamp just occurred</note>
|
||||
</file>
|
||||
<file original="damus/Localizable.xcstrings" source-language="en-US" target-language="en-US" datatype="plaintext">
|
||||
<header>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="16.3" build-num="16E140"/>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="16.4" build-num="16F6"/>
|
||||
</header>
|
||||
<body>
|
||||
<trans-unit id="" xml:space="preserve">
|
||||
@@ -4172,6 +4275,7 @@ String indicating that a given timestamp just occurred</note>
|
||||
<target state="new">%1$@ %2$@</target>
|
||||
<note>Sentence composed of 2 variables to describe how many imports were performed from loading a NostrScript. In source English, the first variable is the number of imports, and the second variable is 'Import' or 'Imports'.
|
||||
Sentence composed of 2 variables to describe how many people are following a user. In source English, the first variable is the number of followers, and the second variable is 'Follower' or 'Followers'.
|
||||
Sentence composed of 2 variables to describe how many people are in the follow pack. In source English, the first variable is the number of users, and the second variable is 'user' or 'users'.
|
||||
Sentence composed of 2 variables to describe how many profiles a user is following. In source English, the first variable is the number of profiles being followed, and the second variable is 'Following'.
|
||||
Sentence composed of 2 variables to describe how many quoted reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'.
|
||||
Sentence composed of 2 variables to describe how many reactions there are on a post. In source English, the first variable is the number of reactions, and the second variable is 'Reaction' or 'Reactions'.
|
||||
@@ -4395,7 +4499,7 @@ Title text to indicate user to an add a relay.</note>
|
||||
<trans-unit id="All" xml:space="preserve">
|
||||
<source>All</source>
|
||||
<target state="new">All</target>
|
||||
<note>Human-readable short description of the 'friends filter' when it is set to 'all'
|
||||
<note>Human-readable short description of the 'trusted network filter' when it is disabled, and therefore is showing all content.
|
||||
Label for filter for all notifications.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="All recent notes" xml:space="preserve">
|
||||
@@ -4907,6 +5011,11 @@ Context menu option for copying the version of damus.</note>
|
||||
<target state="new">Create new wallet</target>
|
||||
<note>Button text for creating a new wallet.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Created by %@" xml:space="preserve">
|
||||
<source>Created by %@</source>
|
||||
<target state="new">Created by %@</target>
|
||||
<note>Lets the user know who created this follow pack.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Current balance" xml:space="preserve">
|
||||
<source>Current balance</source>
|
||||
<target state="new">Current balance</target>
|
||||
@@ -5234,6 +5343,11 @@ Section header for first aid tools and settings</note>
|
||||
<target state="new">Follow Back</target>
|
||||
<note>Button to follow a user back.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Follow Packs" xml:space="preserve">
|
||||
<source>Follow Packs</source>
|
||||
<target state="new">Follow Packs</target>
|
||||
<note>A label indicating that the items below it are follow packs</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Follow hashtag" xml:space="preserve">
|
||||
<source>Follow hashtag</source>
|
||||
<target state="new">Follow hashtag</target>
|
||||
@@ -5316,11 +5430,6 @@ My side interests include languages and I am striving to be a #polyglot - I am a
|
||||
<target state="new">Free</target>
|
||||
<note>Dropdown option for selecting Free plan for DeepL translation service.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Friends of friends" xml:space="preserve">
|
||||
<source>Friends of friends</source>
|
||||
<target state="new">Friends of friends</target>
|
||||
<note>Human-readable short description of the 'friends filter' when it is set to 'friends-of-friends'</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="General" xml:space="preserve">
|
||||
<source>General</source>
|
||||
<target state="new">General</target>
|
||||
@@ -5406,6 +5515,11 @@ This is my first post on Damus, I am happy to meet you all 🤙. What’s up?
|
||||
<target state="new">Hide all 🤙's</target>
|
||||
<note>Section footer describing OnlyZaps mode</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Hide balance" xml:space="preserve">
|
||||
<source>Hide balance</source>
|
||||
<target state="new">Hide balance</target>
|
||||
<note>Setting to hide wallet balance.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Hide notes with #nsfw tags" xml:space="preserve">
|
||||
<source>Hide notes with #nsfw tags</source>
|
||||
<target state="new">Hide notes with #nsfw tags</target>
|
||||
@@ -5825,6 +5939,11 @@ User confirm No</note>
|
||||
<target state="new">No content available to share</target>
|
||||
<note>Title indicating that there was no available content to share</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="No cover image" xml:space="preserve">
|
||||
<source>No cover image</source>
|
||||
<target state="new">No cover image</target>
|
||||
<note>Text letting user know there is no cover image.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="No image is currently setup" xml:space="preserve">
|
||||
<source>No image is currently setup</source>
|
||||
<target state="new">No image is currently setup</target>
|
||||
@@ -5943,6 +6062,21 @@ Label for filter for seeing only notes (instead of notes and replies).</note>
|
||||
<target state="new">Notes & Replies</target>
|
||||
<note>Label for filter for seeing notes and replies (instead of only notes).</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Notes from %@" xml:space="preserve">
|
||||
<source>Notes from %@</source>
|
||||
<target state="new">Notes from %@</target>
|
||||
<note>Text to indicate that notes from one pubkey in our trusted network are shown below.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Notes from %@ & %@" xml:space="preserve">
|
||||
<source>Notes from %1$@ & %2$@</source>
|
||||
<target state="new">Notes from %1$@ & %2$@</target>
|
||||
<note>Text to indicate that notes from two pubkeys in our trusted network are shown below.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Notes from %@, %@ & %@" xml:space="preserve">
|
||||
<source>Notes from %1$@, %2$@ & %3$@</source>
|
||||
<target state="new">Notes from %1$@, %2$@ & %3$@</target>
|
||||
<note>Text to indicate that notes from three pubkeys in our trusted network are shown below.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Notes with the #nsfw tag usually contains adult content or other "Not safe for work" content" xml:space="preserve">
|
||||
<source>Notes with the #nsfw tag usually contains adult content or other "Not safe for work" content</source>
|
||||
<target state="new">Notes with the #nsfw tag usually contains adult content or other "Not safe for work" content</target>
|
||||
@@ -6078,7 +6212,8 @@ Button label to dismiss an error dialog</note>
|
||||
<trans-unit id="People" xml:space="preserve">
|
||||
<source>People</source>
|
||||
<target state="new">People</target>
|
||||
<note>Label for filter for seeing only people follows.</note>
|
||||
<note>Label for filter for seeing only people follows.
|
||||
Label for filter for seeing the people in this follow pack.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="People will be able to send you cash from your profile. No money goes to Damus." xml:space="preserve">
|
||||
<source>People will be able to send you cash from your profile. No money goes to Damus.</source>
|
||||
@@ -6191,6 +6326,11 @@ Section title for deleting the user</note>
|
||||
<target state="new">Post</target>
|
||||
<note>Button to post a note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Posts" xml:space="preserve">
|
||||
<source>Posts</source>
|
||||
<target state="new">Posts</target>
|
||||
<note>Label for filter for seeing the posts from the people in this follow pack.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Private" xml:space="preserve">
|
||||
<source>Private</source>
|
||||
<target state="new">Private</target>
|
||||
@@ -6389,6 +6529,11 @@ Title of relays view</note>
|
||||
<target state="new">Repair relay list</target>
|
||||
<note>Button to repair relay list.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Replies outside your trusted network" xml:space="preserve">
|
||||
<source>Replies outside your trusted network</source>
|
||||
<target state="new">Replies outside your trusted network</target>
|
||||
<note>Section title in thread for replies from outside of the current user's trusted network, which is their follows and follows of follows.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reply" xml:space="preserve">
|
||||
<source>Reply</source>
|
||||
<target state="new">Reply</target>
|
||||
@@ -6475,6 +6620,11 @@ Setting to enable Repost Local Notification</note>
|
||||
<target state="new">Reset contact list</target>
|
||||
<note>Button to reset contact list.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reset tips on launch" xml:space="preserve">
|
||||
<source>Reset tips on launch</source>
|
||||
<target state="new">Reset tips on launch</target>
|
||||
<note>Developer mode setting to reset tips upon app first launch. Tips are visual contextual hints that highlight new, interesting, or unused features users have not discovered yet.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Retry" xml:space="preserve">
|
||||
<source>Retry</source>
|
||||
<target state="new">Retry</target>
|
||||
@@ -6759,6 +6909,11 @@ Button to show more of a long profile description.</note>
|
||||
<target state="new">Show profile action sheets</target>
|
||||
<note>Setting to show profile action sheets when clicking on a user's profile picture</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show replies from your trusted network first" xml:space="preserve">
|
||||
<source>Show replies from your trusted network first</source>
|
||||
<target state="new">Show replies from your trusted network first</target>
|
||||
<note>Setting to show replies in threads from the current user's trusted network first.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show wallet selector" xml:space="preserve">
|
||||
<source>Show wallet selector</source>
|
||||
<target state="new">Show wallet selector</target>
|
||||
@@ -7058,6 +7213,16 @@ Nice to meet you all! #introductions #plebchain </target>
|
||||
<target state="new">Toggle key visibility</target>
|
||||
<note>Accessibility label for toggling the visibility of the private key input field</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Toggle visibility of content from outside your trusted network" xml:space="preserve">
|
||||
<source>Toggle visibility of content from outside your trusted network</source>
|
||||
<target state="new">Toggle visibility of content from outside your trusted network</target>
|
||||
<note>Title of tip that informs users what trusted network means and that they can toggle the visibility of content from outside their trusted network.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Toggle visibility of replies from outside your trusted network" xml:space="preserve">
|
||||
<source>Toggle visibility of replies from outside your trusted network</source>
|
||||
<target state="new">Toggle visibility of replies from outside your trusted network</target>
|
||||
<note>Title of tip that informs users what trusted network means and that they can toggle the visibility of threaded replies from outside their trusted network.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Top Zap" xml:space="preserve">
|
||||
<source>Top Zap</source>
|
||||
<target state="new">Top Zap</target>
|
||||
@@ -7104,6 +7269,11 @@ Section header for text and appearance settings</note>
|
||||
<target state="new">Truncate timeline text</target>
|
||||
<note>Setting to truncate text in timeline</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Trusted Network" xml:space="preserve">
|
||||
<source>Trusted Network</source>
|
||||
<target state="new">Trusted Network</target>
|
||||
<note>Human-readable short description of the 'trusted network filter' when it is enabled, and therefore showing content from only the trusted network.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Try checking the link again, your internet connection, or contact the person who provided you the link for help." xml:space="preserve">
|
||||
<source>Try checking the link again, your internet connection, or contact the person who provided you the link for help.</source>
|
||||
<target state="new">Try checking the link again, your internet connection, or contact the person who provided you the link for help.</target>
|
||||
@@ -7184,7 +7354,8 @@ Example URL to LibreTranslate server</note>
|
||||
<trans-unit id="Untitled" xml:space="preserve">
|
||||
<source>Untitled</source>
|
||||
<target state="new">Untitled</target>
|
||||
<note>Title of longform event if it is untitled.</note>
|
||||
<note>Title of follow list event if it is untitled.
|
||||
Title of longform event if it is untitled.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Update" xml:space="preserve">
|
||||
<source>Update</source>
|
||||
@@ -7535,6 +7706,11 @@ User confirm Yes</note>
|
||||
<target state="new">Your transaction quota has been exceeded.</target>
|
||||
<note>Error description for quota exceeded</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Your trusted network is comprised of profiles you follow and profiles that they follow." xml:space="preserve">
|
||||
<source>Your trusted network is comprised of profiles you follow and profiles that they follow.</source>
|
||||
<target state="new">Your trusted network is comprised of profiles you follow and profiles that they follow.</target>
|
||||
<note>Description of the tip that informs users what trusted network means.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Your wallet does not have sufficient balance for this transaction." xml:space="preserve">
|
||||
<source>Your wallet does not have sufficient balance for this transaction.</source>
|
||||
<target state="new">Your wallet does not have sufficient balance for this transaction.</target>
|
||||
@@ -7698,7 +7874,7 @@ String indicating that a given timestamp just occurred</note>
|
||||
</file>
|
||||
<file original="damus/Resources/InfoPlist.xcstrings" source-language="en-US" target-language="en-US" datatype="plaintext">
|
||||
<header>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="16.3" build-num="16E140"/>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="16.4" build-num="16F6"/>
|
||||
</header>
|
||||
<body>
|
||||
<trans-unit id="CFBundleDisplayName" xml:space="preserve">
|
||||
@@ -7720,7 +7896,7 @@ String indicating that a given timestamp just occurred</note>
|
||||
</file>
|
||||
<file original="highlighter action extension/InfoPlist.xcstrings" source-language="en-US" target-language="en-US" datatype="plaintext">
|
||||
<header>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="16.3" build-num="16E140"/>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="16.4" build-num="16F6"/>
|
||||
</header>
|
||||
<body>
|
||||
<trans-unit id="CFBundleDisplayName" xml:space="preserve">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"comment" : "Amount of money required to publish to the Nostr relay. In English, this would look something like '10 sats / event', meaning it costs 10 sats to publish one event."
|
||||
},
|
||||
"%@ %@" : {
|
||||
"comment" : "Sentence composed of 2 variables to describe how many imports were performed from loading a NostrScript. In source English, the first variable is the number of imports, and the second variable is 'Import' or 'Imports'.\nSentence composed of 2 variables to describe how many people are following a user. In source English, the first variable is the number of followers, and the second variable is 'Follower' or 'Followers'.\nSentence composed of 2 variables to describe how many profiles a user is following. In source English, the first variable is the number of profiles being followed, and the second variable is 'Following'.\nSentence composed of 2 variables to describe how many quoted reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'.\nSentence composed of 2 variables to describe how many reactions there are on a post. In source English, the first variable is the number of reactions, and the second variable is 'Reaction' or 'Reactions'.\nSentence composed of 2 variables to describe how many relay servers a user is connected. In source English, the first variable is the number of relay servers, and the second variable is 'Relay' or 'Relays'.\nSentence composed of 2 variables to describe how many reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'.\nSentence composed of 2 variables to describe how many zap payments there are on a post. In source English, the first variable is the number of zap payments, and the second variable is 'Zap' or 'Zaps'.",
|
||||
"comment" : "Sentence composed of 2 variables to describe how many imports were performed from loading a NostrScript. In source English, the first variable is the number of imports, and the second variable is 'Import' or 'Imports'.\nSentence composed of 2 variables to describe how many people are following a user. In source English, the first variable is the number of followers, and the second variable is 'Follower' or 'Followers'.\nSentence composed of 2 variables to describe how many people are in the follow pack. In source English, the first variable is the number of users, and the second variable is 'user' or 'users'.\nSentence composed of 2 variables to describe how many profiles a user is following. In source English, the first variable is the number of profiles being followed, and the second variable is 'Following'.\nSentence composed of 2 variables to describe how many quoted reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'.\nSentence composed of 2 variables to describe how many reactions there are on a post. In source English, the first variable is the number of reactions, and the second variable is 'Reaction' or 'Reactions'.\nSentence composed of 2 variables to describe how many relay servers a user is connected. In source English, the first variable is the number of relay servers, and the second variable is 'Relay' or 'Relays'.\nSentence composed of 2 variables to describe how many reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'.\nSentence composed of 2 variables to describe how many zap payments there are on a post. In source English, the first variable is the number of zap payments, and the second variable is 'Zap' or 'Zaps'.",
|
||||
"localizations" : {
|
||||
"en-US" : {
|
||||
"stringUnit" : {
|
||||
@@ -160,7 +160,7 @@
|
||||
"comment" : "Heading for some advice text to help the user with an error"
|
||||
},
|
||||
"All" : {
|
||||
"comment" : "Human-readable short description of the 'friends filter' when it is set to 'all'\nLabel for filter for all notifications."
|
||||
"comment" : "Human-readable short description of the 'trusted network filter' when it is disabled, and therefore is showing all content.\nLabel for filter for all notifications."
|
||||
},
|
||||
"All recent notes" : {
|
||||
"comment" : "A label indicating that the notes being displayed below it are all recent notes"
|
||||
@@ -468,6 +468,9 @@
|
||||
"Create new wallet" : {
|
||||
"comment" : "Button text for creating a new wallet."
|
||||
},
|
||||
"Created by %@" : {
|
||||
"comment" : "Lets the user know who created this follow pack."
|
||||
},
|
||||
"Current balance" : {
|
||||
"comment" : "Label for displaying current wallet balance"
|
||||
},
|
||||
@@ -660,6 +663,9 @@
|
||||
"Follow me on Nostr" : {
|
||||
"comment" : "Text on QR code view to prompt viewer looking at screen to follow the user."
|
||||
},
|
||||
"Follow Packs" : {
|
||||
"comment" : "A label indicating that the items below it are follow packs"
|
||||
},
|
||||
"Followed by %@" : {
|
||||
"comment" : "Text to indicate that the user is followed by one of our follows."
|
||||
},
|
||||
@@ -715,9 +721,6 @@
|
||||
"Free" : {
|
||||
"comment" : "Dropdown option for selecting Free plan for DeepL translation service."
|
||||
},
|
||||
"Friends of friends" : {
|
||||
"comment" : "Human-readable short description of the 'friends filter' when it is set to 'friends-of-friends'"
|
||||
},
|
||||
"General" : {
|
||||
"comment" : "Section header for general damus notifications user configuration"
|
||||
},
|
||||
@@ -763,6 +766,9 @@
|
||||
"Hide all 🤙's" : {
|
||||
"comment" : "Section footer describing OnlyZaps mode"
|
||||
},
|
||||
"Hide balance" : {
|
||||
"comment" : "Setting to hide wallet balance."
|
||||
},
|
||||
"Hide notes with #nsfw tags" : {
|
||||
"comment" : "Setting to hide notes with the #nsfw (not safe for work) tags"
|
||||
},
|
||||
@@ -1006,6 +1012,9 @@
|
||||
"No content available to share" : {
|
||||
"comment" : "Title indicating that there was no available content to share"
|
||||
},
|
||||
"No cover image" : {
|
||||
"comment" : "Text letting user know there is no cover image."
|
||||
},
|
||||
"No image is currently setup" : {
|
||||
"comment" : "Accessibility value on image control"
|
||||
},
|
||||
@@ -1090,6 +1099,31 @@
|
||||
"Notes & Replies" : {
|
||||
"comment" : "Label for filter for seeing notes and replies (instead of only notes)."
|
||||
},
|
||||
"Notes from %@" : {
|
||||
"comment" : "Text to indicate that notes from one pubkey in our trusted network are shown below."
|
||||
},
|
||||
"Notes from %@ & %@" : {
|
||||
"comment" : "Text to indicate that notes from two pubkeys in our trusted network are shown below.",
|
||||
"localizations" : {
|
||||
"en-US" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "Notes from %1$@ & %2$@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Notes from %@, %@ & %@" : {
|
||||
"comment" : "Text to indicate that notes from three pubkeys in our trusted network are shown below.",
|
||||
"localizations" : {
|
||||
"en-US" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "Notes from %1$@, %2$@ & %3$@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Notes with the #nsfw tag usually contains adult content or other \"Not safe for work\" content" : {
|
||||
"comment" : "Section footer clarifying what #nsfw (not safe for work) tags mean"
|
||||
},
|
||||
@@ -1184,7 +1218,7 @@
|
||||
"comment" : "Label to display that authentication to a server is pending."
|
||||
},
|
||||
"People" : {
|
||||
"comment" : "Label for filter for seeing only people follows."
|
||||
"comment" : "Label for filter for seeing only people follows.\nLabel for filter for seeing the people in this follow pack."
|
||||
},
|
||||
"People will be able to send you cash from your profile. No money goes to Damus." : {
|
||||
"comment" : "The description for one of the \"Why add Zaps?\" boxes"
|
||||
@@ -1252,6 +1286,9 @@
|
||||
"Post" : {
|
||||
"comment" : "Button to post a note."
|
||||
},
|
||||
"Posts" : {
|
||||
"comment" : "Label for filter for seeing the posts from the people in this follow pack."
|
||||
},
|
||||
"Private" : {
|
||||
"comment" : "Button text to indicate that the zap type is a private zap.\nHeading indicating that this application keeps personally identifiable information private. A sentence describing what is done to keep data private comes after this heading.\nPicker option to indicate that a zap should be sent privately and not identify the user to the public."
|
||||
},
|
||||
@@ -1378,6 +1415,9 @@
|
||||
"Repair relay list" : {
|
||||
"comment" : "Button to repair relay list."
|
||||
},
|
||||
"Replies outside your trusted network" : {
|
||||
"comment" : "Section title in thread for replies from outside of the current user's trusted network, which is their follows and follows of follows."
|
||||
},
|
||||
"Reply" : {
|
||||
"comment" : "Accessibility label for reply button"
|
||||
},
|
||||
@@ -1437,6 +1477,9 @@
|
||||
"Reset contact list" : {
|
||||
"comment" : "Button to reset contact list."
|
||||
},
|
||||
"Reset tips on launch" : {
|
||||
"comment" : "Developer mode setting to reset tips upon app first launch. Tips are visual contextual hints that highlight new, interesting, or unused features users have not discovered yet."
|
||||
},
|
||||
"Retry" : {
|
||||
"comment" : "Button to retry completing account creation after an error occurred."
|
||||
},
|
||||
@@ -1602,6 +1645,9 @@
|
||||
"Show profile action sheets" : {
|
||||
"comment" : "Setting to show profile action sheets when clicking on a user's profile picture"
|
||||
},
|
||||
"Show replies from your trusted network first" : {
|
||||
"comment" : "Setting to show replies in threads from the current user's trusted network first."
|
||||
},
|
||||
"Show wallet selector" : {
|
||||
"comment" : "Toggle to show or hide selection of wallet."
|
||||
},
|
||||
@@ -1776,6 +1822,12 @@
|
||||
"Toggle key visibility" : {
|
||||
"comment" : "Accessibility label for toggling the visibility of the private key input field"
|
||||
},
|
||||
"Toggle visibility of content from outside your trusted network" : {
|
||||
"comment" : "Title of tip that informs users what trusted network means and that they can toggle the visibility of content from outside their trusted network."
|
||||
},
|
||||
"Toggle visibility of replies from outside your trusted network" : {
|
||||
"comment" : "Title of tip that informs users what trusted network means and that they can toggle the visibility of threaded replies from outside their trusted network."
|
||||
},
|
||||
"Top hits" : {
|
||||
"comment" : "A label indicating that the notes being displayed below it are all top note search results"
|
||||
},
|
||||
@@ -1806,6 +1858,9 @@
|
||||
"Truncate timeline text" : {
|
||||
"comment" : "Setting to truncate text in timeline"
|
||||
},
|
||||
"Trusted Network" : {
|
||||
"comment" : "Human-readable short description of the 'trusted network filter' when it is enabled, and therefore showing content from only the trusted network."
|
||||
},
|
||||
"Try checking the link again, your internet connection, or contact the person who provided you the link for help." : {
|
||||
"comment" : "Tips on what to do if a note cannot be found."
|
||||
},
|
||||
@@ -1849,7 +1904,7 @@
|
||||
"comment" : "Label represnting a button that the user can tap to unmute a given hashtag so they start seeing it in their feed again."
|
||||
},
|
||||
"Untitled" : {
|
||||
"comment" : "Title of longform event if it is untitled."
|
||||
"comment" : "Title of follow list event if it is untitled.\nTitle of longform event if it is untitled."
|
||||
},
|
||||
"Update" : {
|
||||
"comment" : "Update button text for updating image url."
|
||||
@@ -2055,6 +2110,9 @@
|
||||
"Your transaction quota has been exceeded." : {
|
||||
"comment" : "Error description for quota exceeded"
|
||||
},
|
||||
"Your trusted network is comprised of profiles you follow and profiles that they follow." : {
|
||||
"comment" : "Description of the tip that informs users what trusted network means."
|
||||
},
|
||||
"Your wallet does not have sufficient balance for this transaction." : {
|
||||
"comment" : "Error description for insufficient balance"
|
||||
},
|
||||
|
||||
Binary file not shown.
@@ -2,6 +2,22 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>follow_pack_user_count</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@FOLLOW_PACK_USERS@</string>
|
||||
<key>FOLLOW_PACK_USERS</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>d</string>
|
||||
<key>one</key>
|
||||
<string>user</string>
|
||||
<key>other</key>
|
||||
<string>users</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>followed_by_three_and_others</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
@@ -82,6 +98,22 @@
|
||||
<string>Imports</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>notes_from_three_and_others</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@OTHERS@</string>
|
||||
<key>OTHERS</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>d</string>
|
||||
<key>one</key>
|
||||
<string>Notes from %2$@, %3$@, %4$@ & %1$d other in your trusted network</string>
|
||||
<key>other</key>
|
||||
<string>Notes from %2$@, %3$@, %4$@ & %1$d others in your trusted network</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>people_reposted_count</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
"project" : "damus.xcodeproj",
|
||||
"targetLocale" : "en-US",
|
||||
"toolInfo" : {
|
||||
"toolBuildNumber" : "16E140",
|
||||
"toolBuildNumber" : "16F6",
|
||||
"toolID" : "com.apple.dt.xcode",
|
||||
"toolName" : "Xcode",
|
||||
"toolVersion" : "16.3"
|
||||
"toolVersion" : "16.4"
|
||||
},
|
||||
"version" : "1.0"
|
||||
}
|
||||
Binary file not shown.
@@ -2,6 +2,22 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>follow_pack_user_count</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@FOLLOW_PACK_USERS@</string>
|
||||
<key>FOLLOW_PACK_USERS</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>d</string>
|
||||
<key>one</key>
|
||||
<string>gebruiker</string>
|
||||
<key>other</key>
|
||||
<string>gebruikers</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>followed_by_three_and_others</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
@@ -82,6 +98,22 @@
|
||||
<string>Importeringen</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>notes_from_three_and_others</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@OTHERS@</string>
|
||||
<key>OTHERS</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>d</string>
|
||||
<key>one</key>
|
||||
<string>Notities van %2$@, %3$@ en %4$@; %1$d ander in je netwerk</string>
|
||||
<key>other</key>
|
||||
<string>Notities van %2$@, %3$@ en %4$@; %1$d anderen in je netwerk</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>people_reposted_count</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
|
||||
Binary file not shown.
@@ -2,6 +2,20 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>follow_pack_user_count</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@FOLLOW_PACK_USERS@</string>
|
||||
<key>FOLLOW_PACK_USERS</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>d</string>
|
||||
<key>other</key>
|
||||
<string>ผู้ใช้</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>followed_by_three_and_others</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
|
||||
@@ -9,18 +9,6 @@ import XCTest
|
||||
@testable import damus
|
||||
|
||||
|
||||
extension Block {
|
||||
var asInvoice: Invoice? {
|
||||
switch self {
|
||||
case .invoice(let invoice):
|
||||
return invoice
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final class InvoiceTests: XCTestCase {
|
||||
|
||||
override func setUpWithError() throws {
|
||||
|
||||
@@ -15,6 +15,7 @@ final class LocalizationUtilTests: XCTestCase {
|
||||
|
||||
// Test cases of the localization string key, and the expected en-US strings for a count of 0, 1, and 2.
|
||||
let keys = [
|
||||
["follow_pack_user_count", "users", "user", "users"],
|
||||
["followers_count", "Followers", "Follower", "Followers"],
|
||||
["following_count", "Following", "Following", "Following"],
|
||||
["hellthread_notifications_disabled", "Hide notifications that tag more than 0 profiles", "Hide notifications that tag more than 1 profile", "Hide notifications that tag more than 2 profiles"],
|
||||
|
||||
@@ -368,7 +368,7 @@ class NdbNote: Codable, Equatable, Hashable {
|
||||
// Extension to make NdbNote compatible with NostrEvent's original API
|
||||
extension NdbNote {
|
||||
var is_textlike: Bool {
|
||||
return kind == 1 || kind == 42 || kind == 30023 || kind == 9802
|
||||
return kind == 1 || kind == 42 || kind == 30023 || kind == 9802 || kind == 39089
|
||||
}
|
||||
|
||||
var is_quote_repost: NoteId? {
|
||||
|
||||
Reference in New Issue
Block a user