Skip to content

Commit

Permalink
fix word mute
Browse files Browse the repository at this point in the history
  • Loading branch information
shiosyakeyakini-info committed Nov 3, 2023
1 parent e3834fa commit 7b18052
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/repository/account_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class AccountRepository extends ChangeNotifier {
_account[index] = _account[index].copyWith(i: i);

accountDataValidated[index] = true;
reader(notesProvider(_account[index])).updateMute(i.mutedWords);
notifyListeners();
}

Expand Down
6 changes: 5 additions & 1 deletion lib/repository/note_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ class NoteRepository extends ChangeNotifier {
final List<RegExp> muteWordRegExps = [];

NoteRepository(this.misskey, Account account) {
for (final muteWord in account.i.mutedWords) {
updateMute(account.i.mutedWords);
}

void updateMute(List<MuteWord> mutedWords) {
for (final muteWord in mutedWords) {
final content = muteWord.content;
final regExp = muteWord.regExp;
if (content != null) {
Expand Down

0 comments on commit 7b18052

Please sign in to comment.