mirror of
https://github.com/madari-media/madari-oss.git
synced 2026-01-11 22:40:23 +00:00
Project import generated by Copybara.
GitOrigin-RevId: cadf71e71d562565a85bec91993f1f947bcd2845
This commit is contained in:
parent
ff9ece0628
commit
af06c03549
4 changed files with 36 additions and 4 deletions
|
|
@ -262,7 +262,7 @@ class StremioConnectionService extends BaseConnectionService {
|
|||
.toList(),
|
||||
);
|
||||
|
||||
yield streams;
|
||||
if (streams.isNotEmpty) yield streams;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
import 'package:cached_query_flutter/cached_query_flutter.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:madari_client/engine/engine.dart';
|
||||
import 'package:madari_client/features/connections/service/base_connection_service.dart';
|
||||
import 'package:madari_client/features/connections/types/base/base.dart';
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
import 'package:shimmer/shimmer.dart';
|
||||
|
||||
import '../../../../utils/grid.dart';
|
||||
|
|
@ -43,8 +45,35 @@ class _RenderLibraryListState extends State<RenderLibraryList> {
|
|||
}
|
||||
|
||||
if (state.status == QueryStatus.error) {
|
||||
return Center(
|
||||
child: Text("Something went wrong ${state.error}"),
|
||||
final errorMessage = (
|
||||
state.error is ClientException
|
||||
? (state.error as ClientException).response["message"]
|
||||
: "",
|
||||
);
|
||||
|
||||
return SizedBox(
|
||||
height: _getListHeight(context),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
child: Container(
|
||||
color: Colors.black45,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 16,
|
||||
horizontal: 16,
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Something went wrong while loading library\n${errorMessage.$1}",
|
||||
textAlign: TextAlign.center,
|
||||
style: GoogleFonts.exo2().copyWith(
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -194,7 +194,8 @@ class _RenderStreamListState extends State<RenderStreamList> {
|
|||
);
|
||||
}
|
||||
|
||||
if (snapshot.data?.isEmpty == true) {
|
||||
if (snapshot.data?.isEmpty == true &&
|
||||
snapshot.connectionState == ConnectionState.done) {
|
||||
return Center(
|
||||
child: Text(
|
||||
"No stream found",
|
||||
|
|
|
|||
|
|
@ -223,6 +223,8 @@ class _StremioStreamSelectorState extends State<StremioStreamSelector> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
print("Neo");
|
||||
|
||||
return StreamBuilder(
|
||||
stream: _stream,
|
||||
builder: (context, snapshot) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue