Skip to content

Commit

Permalink
Merge pull request #669 from 4ster1sk/fix/issue-665
Browse files Browse the repository at this point in the history
音楽ファイルではサムネイルを表示しない
  • Loading branch information
shiosyakeyakini-info authored Nov 10, 2024
2 parents b48d6db + 7166b3e commit 300aa35
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion lib/view/common/misskey_notes/misskey_file_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ class MisskeyFileView extends HookConsumerWidget {
width: double.infinity,
child: MisskeyImage(
isSensitive: targetFile.element.isSensitive,
thumbnailUrl: targetFile.element.thumbnailUrl,
thumbnailUrl: (targetFile.element.type.startsWith("audio"))
? null
: targetFile.element.thumbnailUrl,
targetFiles: targetFiles,
fileType: targetFile.element.type,
name: targetFile.element.name,
Expand Down
11 changes: 6 additions & 5 deletions lib/view/common/note_file_dialog/media_viewer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ class MediaViewer extends HookConsumerWidget {
fit: StackFit.passthrough,
alignment: Alignment.center,
children: [
NetworkImageView(
url: file.thumbnailUrl.toString(),
type: ImageType.imageThumbnail,
fit: BoxFit.contain,
),
if (!file.type.startsWith("audio"))
NetworkImageView(
url: file.thumbnailUrl.toString(),
type: ImageType.imageThumbnail,
fit: BoxFit.contain,
),
Icon(
Icons.play_circle,
size: 100,
Expand Down

0 comments on commit 300aa35

Please sign in to comment.