Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nostr Preferences #1186

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
ddcafa7
comments platform
sarthak13gupta Jul 22, 2023
4d1c991
merge changes
sarthak13gupta Jul 22, 2023
5062f78
toggle comments check
sarthak13gupta Jul 23, 2023
cc0cdc8
adding nostr screen
sarthak13gupta Jul 25, 2023
2926867
Merge remote-tracking branch 'origin/toggle_comments_check' into nost…
sarthak13gupta Jul 25, 2023
4ddc46b
nostr screen login/logout
sarthak13gupta Jul 27, 2023
e93e05a
Merge branch 'master' of https://github.com/breez/breezmobile into co…
sarthak13gupta Jul 27, 2023
ea79bd3
Merge branch 'master' of https://github.com/breez/breezmobile into to…
sarthak13gupta Jul 27, 2023
93a0761
toggle comments changes
sarthak13gupta Jul 27, 2023
5f7e0da
Disable Nostr title corrected
sarthak13gupta Jul 27, 2023
87cffd5
Merge branch 'toggle_comments_check' of https://github.com/sarthak13g…
sarthak13gupta Jul 29, 2023
610bed5
anytime ref changes
sarthak13gupta Jul 29, 2023
71ec1b8
Merge branch 'master' of https://github.com/sarthak13gupta/breezmobil…
sarthak13gupta Jul 29, 2023
1a66294
Merge branch 'nostr_screen_check' of https://github.com/sarthak13gupt…
sarthak13gupta Jul 29, 2023
050959a
Merge branch 'comments_platform' of https://github.com/sarthak13gupta…
sarthak13gupta Jul 29, 2023
69a2d14
Merge branch 'nostr_screen' of https://github.com/sarthak13gupta/bree…
sarthak13gupta Jul 29, 2023
a4e1dfb
anytime ref
sarthak13gupta Jul 29, 2023
c7df79c
Merge branch 'nostr_screen' of https://github.com/sarthak13gupta/bree…
sarthak13gupta Jul 29, 2023
7d180ca
login via comments platform
sarthak13gupta Jul 29, 2023
2896791
login from snort
sarthak13gupta Jul 29, 2023
00768ff
Merge branch 'master' into comments_platform
sarthak13gupta Aug 3, 2023
d129527
added primal and publishing relays
sarthak13gupta Aug 6, 2023
3cb85da
merge changes
sarthak13gupta Aug 6, 2023
0b5c827
previous primal logo removed
sarthak13gupta Aug 6, 2023
9100324
commentsBloc -> NostrCommentBloc
sarthak13gupta Aug 11, 2023
111cba4
Merge branch 'comments_platform' of https://github.com/sarthak13gupta…
sarthak13gupta Aug 11, 2023
7c89fcb
Merge branch 'master' of https://github.com/sarthak13gupta/breezmobil…
sarthak13gupta Aug 11, 2023
fece6dd
nostr-connect
sarthak13gupta Aug 11, 2023
232c075
merge_conflicts
sarthak13gupta Aug 11, 2023
a38365a
mobile scanner -> 3.3.0
sarthak13gupta Aug 11, 2023
8b06da9
saving relays in preferences
sarthak13gupta Aug 11, 2023
36716be
anytime ref changes
sarthak13gupta Aug 11, 2023
0a6682b
removing unwanted comments
sarthak13gupta Aug 11, 2023
e24e7a2
review changes part-1
sarthak13gupta Aug 15, 2023
22e0afe
anytime ref changes
sarthak13gupta Aug 15, 2023
f37483d
making nostrPrivateKey a private field in the NostrBloc class
sarthak13gupta Aug 18, 2023
5cfabec
merge changes nostr_preferences
sarthak13gupta Aug 18, 2023
9b0b60f
removing secure_storage
sarthak13gupta Aug 19, 2023
032060e
LoginWithImportedNostrKey-> StoreNostrKey
sarthak13gupta Aug 23, 2023
bff6f67
moving nostrSettings inside nostrBloc (part-1)
sarthak13gupta Aug 25, 2023
43ee2e6
moving nostrSettings inside nostrBloc (part-2) completed
sarthak13gupta Aug 25, 2023
225aa13
nip04 operations corrected
sarthak13gupta Aug 25, 2023
f2d5954
nip04 operations corrected(nostrBloc)
sarthak13gupta Aug 25, 2023
f898084
injecting nostrComments from BreezMobile to Anytime(without toggling)
sarthak13gupta Sep 5, 2023
40ed1d7
toggling comments added
sarthak13gupta Sep 6, 2023
46fad4e
Merge branch 'master' into comments_platform
sarthak13gupta Sep 7, 2023
5304183
merge conflicts
sarthak13gupta Sep 7, 2023
d8abd95
aligning nostrComments with nostr_preferences
sarthak13gupta Sep 7, 2023
5019311
Merge branch 'master' into nostr_preferences
sarthak13gupta Sep 16, 2023
d6413f7
mobile_scanner 3.3.0 changes
sarthak13gupta Sep 17, 2023
7386fec
nostr_preferences merge changes
sarthak13gupta Oct 9, 2023
0a59d5b
merge changes
sarthak13gupta Oct 9, 2023
e046651
anytime ref and adding nostr preferences in the home_navigation_drawer
sarthak13gupta Oct 13, 2023
fe0e4c1
Merge branch 'master' into nostr_preferences
sarthak13gupta Oct 19, 2023
945c696
Merge branch 'master' into nostr_preferences
sarthak13gupta Nov 19, 2023
7f9e329
Update dev.dart
sarthak13gupta Nov 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
aligning nostrComments with nostr_preferences
sarthak13gupta committed Sep 7, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit d8abd95d3116510949df4f699f97f1e54ea84c5e
10 changes: 9 additions & 1 deletion lib/bloc/nostr/nostr_comments/nostr_comments_bloc.dart
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ import 'package:breez/bloc/nostr/nostr_actions.dart';
import 'package:breez/bloc/nostr/nostr_bloc.dart';
import 'package:breez/bloc/nostr/nostr_comments/nostr_comments_model.dart';
import 'package:breez/bloc/nostr/nostr_comments/nostr_comments_state_event.dart';
import 'package:breez/bloc/nostr/nostr_model.dart';
import 'package:nostr_tools/nostr_tools.dart';

class NostrCommentBloc extends Bloc {
@@ -349,13 +350,20 @@ class NostrCommentBloc extends Bloc {

// this method is to make sure keyPair is made before signing the sortedEvents
Future<void> _getPubKey() async {
// will log the user via nostrComments
NostrSettings settings = await nostrBloc.nostrSettingsStream.first;
if (!settings.isLoggedIn) {
nostrBloc.nostrSettingsSettingsSink.add(settings.copyWith(
isLoggedIn: true,
));
}
nostrBloc.actionsSink.add(GetPublicKey());
}

Future<void> signEvent(Map<String, dynamic> eventData) async {
// _signEventController.add(eventData);

nostrBloc.actionsSink.add(SignEvent(eventData, nostrBloc.nostrPrivateKey));
nostrBloc.actionsSink.add(SignEvent(eventData));
Map<String, dynamic> signedEvent = await nostrBloc.eventStream.first;
final signedNostrEvent = CommentEvent.mapToEvent(signedEvent);
await _publishNewEvent(signedNostrEvent);
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ void main() async {
child: AnytimePodcastApp(
mobileService,
repository,
blocs.marketplaceBloc,
blocs.nostrBloc,
Provider<PodcastPaymentsBloc>(
lazy: false,
create: (ctx) => PodcastPaymentsBloc(
10 changes: 5 additions & 5 deletions lib/routes/podcast/podcast_page.dart
Original file line number Diff line number Diff line change
@@ -63,10 +63,10 @@ class AnytimePodcastApp extends StatefulWidget {
SettingsBloc settingsBloc;
MobileSettingsService mobileSettingsService;
OPMLService opmlService;
MarketplaceBloc marketplaceBloc;
NostrBloc nostrBloc;

AnytimePodcastApp(this.mobileSettingsService, this.repository,
this.marketplaceBloc, this.child)
AnytimePodcastApp(
this.mobileSettingsService, this.repository, this.nostrBloc, this.child)
: podcastApi = PodcastIndexAPI() {
downloadService = MobileDownloadService(
repository: repository, downloadManager: AnytimeDownloadManager());
@@ -119,7 +119,7 @@ class AnytimePodcastAppState extends State<AnytimePodcastApp> {
}

void _listenToggle() {
widget.marketplaceBloc.nostrSettingsStream.listen((settings) {
widget.nostrBloc.nostrSettingsStream.listen((settings) {
setState(() {
showComments = !settings.enableNostr;
});
@@ -204,7 +204,7 @@ class AnytimePodcastAppState extends State<AnytimePodcastApp> {
Provider<NostrCommentBloc>(
create: (_) => NostrCommentBloc(
episodeStream: widget.audioPlayerService.episodeEvent,
nostrBloc: nostrBloc,
nostrBloc: widget.nostrBloc,
),
dispose: (_, value) => value.dispose(),
),