Skip to content

Commit

Permalink
Merge branch 'lint/user-page' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
poppingmoon committed Jan 2, 2024
2 parents a347b21 + c6cfe66 commit 2fbf13e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
17 changes: 8 additions & 9 deletions lib/view/common/misskey_notes/misskey_note.dart
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,14 @@ class MisskeyNoteState extends ConsumerState<MisskeyNote> {
MisskeyEmojiData? requestEmoji,
}) async {
final account = AccountScope.of(context);

if (requestEmoji != null &&
!ref
.read(generalSettingsRepositoryProvider)
.settings
.enableDirectReaction) {
// カスタム絵文字押下でのリアクション無効
return;
}
// 他のサーバーからログインしている場合は他のアカウントで開く
if (!account.hasToken) {
ref
Expand All @@ -616,14 +623,6 @@ class MisskeyNoteState extends ConsumerState<MisskeyNote> {
// すでにリアクション済み
return;
}
if (requestEmoji != null &&
!ref
.read(generalSettingsRepositoryProvider)
.settings
.enableDirectReaction) {
// カスタム絵文字押下でのリアクション無効
return;
}
if (requestEmoji != null && isLikeOnly) {
// いいねのみでカスタム絵文字押下
return;
Expand Down
8 changes: 4 additions & 4 deletions lib/view/federation_page/federation_announcements.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class AnnouncementState extends ConsumerState<Announcement> {

@override
Widget build(BuildContext context) {
final account = AccountScope.of(context);
final icon = data.icon;
final imageUrl = data.imageUrl;
return Padding(
Expand Down Expand Up @@ -174,9 +175,7 @@ class AnnouncementState extends ConsumerState<Announcement> {
const Padding(padding: EdgeInsets.only(top: 10)),
MfmText(
mfmText: data.text,
host: AccountScope.of(context).host == widget.host
? null
: widget.host,
host: account.host == widget.host ? null : widget.host,
),
if (imageUrl != null)
Center(
Expand All @@ -188,7 +187,8 @@ class AnnouncementState extends ConsumerState<Announcement> {
),
),
),
if (AccountScope.of(context).host == widget.host &&
if (account.hasToken &&
account.host == widget.host &&
data.isRead == false)
ElevatedButton(
onPressed: () async {
Expand Down

0 comments on commit 2fbf13e

Please sign in to comment.