Skip to content

Commit e560cdd

Browse files
committed
fix: thumbnails
1 parent 5c46e00 commit e560cdd

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

lib/const.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const defaultRelays = [
3737
];
3838
const searchRelays = ["wss://relay.nostr.band", "wss://search.nos.today"];
3939
const nwcRelays = ["wss://relay.getalby.com/v1"];
40-
final apiUrl = dotenv.env["API_URL"] ?? "https://api.zap.stream/api/nostr";
40+
final apiUrl = dotenv.env["API_URL"] ?? "https://api-core.zap.stream/api/v1";
4141

4242
final loginData = LoginData();
4343
final RouteObserver<ModalRoute<void>> routeObserver =

lib/utils.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ StreamInfo extractStreamInfo(Nip01Event ev) {
123123
matchTag(t, 'summary', (v) => ret.summary = v);
124124
matchTag(t, 'image', (v) => ret.image = v);
125125
matchTag(t, 'thumbnail', (v) => ret.thumbnail = v);
126+
matchTag(t, 'thumb', (v) => ret.thumbnail = v);
126127
matchTag(
127128
t,
128129
'status',

lib/widgets/avatar.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class AvatarWidget extends StatelessWidget {
2525
child: ProxyImg(
2626
url:
2727
profile.picture ??
28-
"https://nostr.api.v0l.io/api/v1/avatar/cyberpunks/${profile.pubKey}",
28+
"https://nostr-api.v0l.io/api/v1/avatar/cyberpunks/${profile.pubKey}",
2929
resize: thisSize.ceil(),
3030
width: thisSize,
3131
height: thisSize,

lib/widgets/stream_tile.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ class StreamTileWidget extends StatelessWidget {
3333
children: [
3434
Center(
3535
child: ProxyImg(
36-
url: stream.info.image ?? "",
36+
url:
37+
(stream.info.image?.isNotEmpty ?? false)
38+
? stream.info.image
39+
: stream.info.thumbnail,
3740
placeholderSize: 100,
3841
),
3942
),

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: zap_stream_flutter
22
description: "zap.stream"
33
publish_to: "none"
4-
version: 1.1.4+18
4+
version: 1.1.5+19
55

66
environment:
77
sdk: ^3.7.2

0 commit comments

Comments
 (0)