Skip to content

Commit

Permalink
mall fix for videolist
Browse files Browse the repository at this point in the history
  • Loading branch information
lamarios committed Feb 17, 2023
1 parent 683e1fe commit eb1e146
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions lib/views/videoList.dart
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import 'dart:async';
import 'package:fbroadcast/fbroadcast.dart';
import 'package:flutter/foundation.dart';
import 'package:intl/intl.dart';

import 'package:flutter/cupertino.dart';
import 'package:after_layout/after_layout.dart';
import 'package:fbroadcast/fbroadcast.dart';
import 'package:flutter/material.dart';
import 'package:flutter_fadein/flutter_fadein.dart';
import 'package:invidious/utils.dart';
import 'package:invidious/views/video.dart';

import 'package:after_layout/after_layout.dart';
import 'package:invidious/views/videoList/singleVideo.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';

import '../globals.dart';
import '../models/videoInList.dart';
import 'package:flutter_fadein/flutter_fadein.dart';

class VideoList extends StatefulWidget {
Future<List<VideoInList>> Function()? getVideos;
Expand Down Expand Up @@ -129,11 +125,11 @@ class VideoListState extends State<VideoList> with AfterLayoutMixin<VideoList> {
}

loadVideo(Future<List<VideoInList>> Function() refreshFunction) async {
setState(() {
error = '';
loading = true;
});
if (widget.getVideos != null) {
setState(() {
error = '';
loading = true;
});
try {
var videos = await refreshFunction();
setState(() {
Expand All @@ -147,9 +143,8 @@ class VideoListState extends State<VideoList> with AfterLayoutMixin<VideoList> {
error = 'Couldn\'t fetch videos, tap to try again';
});
}
refreshController.refreshCompleted();
}

refreshController.refreshCompleted();
}

@override
Expand Down

0 comments on commit eb1e146

Please sign in to comment.