Skip to content

Commit

Permalink
Use CupertinoButton for thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
moffatman committed Nov 19, 2022
1 parent ea43bbc commit a6594f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
11 changes: 6 additions & 5 deletions lib/widgets/post_row.dart
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ class PostRow extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: latestPost.attachments.map((attachment) => PopupAttachment(
attachment: attachment,
child: GestureDetector(
child: CupertinoButton(
padding: EdgeInsets.zero,
minSize: 0,
child: Stack(
alignment: Alignment.center,
fit: StackFit.loose,
Expand Down Expand Up @@ -211,7 +213,7 @@ class PostRow extends StatelessWidget {
)
]
),
onTap: () {
onPressed: () {
onThumbnailTap?.call(attachment);
}
)
Expand All @@ -222,9 +224,8 @@ class PostRow extends StatelessWidget {
child: SizedBox(
width: 75,
height: 75,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: onRequestArchive,
child: CupertinoButton(
onPressed: onRequestArchive,
child: const Icon(CupertinoIcons.question_square, size: 36)
)
)
Expand Down
6 changes: 4 additions & 2 deletions lib/widgets/thread_row.dart
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ class ThreadRow extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: latestThread.attachments.map((attachment) => PopupAttachment(
attachment: attachment,
child: GestureDetector(
child: CupertinoButton(
padding: EdgeInsets.zero,
minSize: 0,
child: Stack(
alignment: Alignment.center,
fit: StackFit.loose,
Expand Down Expand Up @@ -311,7 +313,7 @@ class ThreadRow extends StatelessWidget {
)
]
),
onTap: () => onThumbnailTap?.call(attachment)
onPressed: () => onThumbnailTap?.call(attachment)
)
)).expand((x) => [const SizedBox(height: 8), x]).skip(1).toList()
)
Expand Down

0 comments on commit a6594f5

Please sign in to comment.