mirror of
https://github.com/stonega/tsacdop
synced 2025-03-06 04:07:49 +01:00
modified: .circleci/config.yml
This commit is contained in:
parent
860e2ed626
commit
d23502ed97
@ -21,8 +21,5 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Build the Android version
|
name: Build the Android version
|
||||||
command: flutter build appbundle --no-shrink
|
command: flutter build appbundle --no-shrink
|
||||||
- run:
|
|
||||||
name: Build the Android apks
|
|
||||||
command: flutter build apk --split-per-abi --no-shrink
|
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: build/app/outputs/
|
path: build/app/outputs/
|
@ -18,6 +18,7 @@ import '../util/context_extension.dart';
|
|||||||
import '../util/custompaint.dart';
|
import '../util/custompaint.dart';
|
||||||
import '../state/download_state.dart';
|
import '../state/download_state.dart';
|
||||||
import '../state/podcast_group.dart';
|
import '../state/podcast_group.dart';
|
||||||
|
import '../state/subscribe_podcast.dart';
|
||||||
import 'playlist.dart';
|
import 'playlist.dart';
|
||||||
import 'importompl.dart';
|
import 'importompl.dart';
|
||||||
import 'audioplayer.dart';
|
import 'audioplayer.dart';
|
||||||
@ -473,199 +474,214 @@ class _RecentUpdateState extends State<_RecentUpdate>
|
|||||||
snapshot.data.length == _top) _loadMoreEpisode();
|
snapshot.data.length == _top) _loadMoreEpisode();
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
child: CustomScrollView(
|
child: Selector<SubscribeWorker, bool>(
|
||||||
key: PageStorageKey<String>('update'),
|
selector: (_, worker) => worker.created,
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
builder: (context, created, child) {
|
||||||
slivers: <Widget>[
|
return CustomScrollView(
|
||||||
SliverToBoxAdapter(
|
key: PageStorageKey<String>('update'),
|
||||||
child: Container(
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
height: 40,
|
slivers: <Widget>[
|
||||||
color: context.primaryColor,
|
SliverToBoxAdapter(
|
||||||
child: Row(
|
child: Container(
|
||||||
children: <Widget>[
|
height: 40,
|
||||||
Consumer<GroupList>(
|
color: context.primaryColor,
|
||||||
builder: (context, groupList, child) =>
|
child: Row(
|
||||||
Material(
|
children: <Widget>[
|
||||||
color: Colors.transparent,
|
Consumer<GroupList>(
|
||||||
child: PopupMenuButton<String>(
|
builder:
|
||||||
shape: RoundedRectangleBorder(
|
(context, groupList, child) =>
|
||||||
borderRadius: BorderRadius.all(
|
Material(
|
||||||
Radius.circular(10))),
|
color: Colors.transparent,
|
||||||
elevation: 1,
|
child: PopupMenuButton<String>(
|
||||||
tooltip: 'Groups fliter',
|
shape: RoundedRectangleBorder(
|
||||||
child: Container(
|
borderRadius:
|
||||||
padding: EdgeInsets.symmetric(
|
BorderRadius.all(
|
||||||
horizontal: 20),
|
Radius.circular(10))),
|
||||||
height: 50,
|
elevation: 1,
|
||||||
child: Row(
|
tooltip: 'Groups fliter',
|
||||||
mainAxisSize: MainAxisSize.min,
|
child: Container(
|
||||||
children: <Widget>[
|
padding: EdgeInsets.symmetric(
|
||||||
Text(_groupName),
|
horizontal: 20),
|
||||||
Padding(
|
height: 50,
|
||||||
padding:
|
child: Row(
|
||||||
EdgeInsets.symmetric(
|
mainAxisSize:
|
||||||
horizontal: 5),
|
MainAxisSize.min,
|
||||||
),
|
children: <Widget>[
|
||||||
Icon(
|
Text(_groupName),
|
||||||
LineIcons.filter_solid,
|
Padding(
|
||||||
size: 18,
|
padding: EdgeInsets
|
||||||
)
|
.symmetric(
|
||||||
],
|
horizontal: 5),
|
||||||
)),
|
),
|
||||||
itemBuilder: (context) => [
|
Icon(
|
||||||
PopupMenuItem(
|
LineIcons.filter_solid,
|
||||||
child: Text('All'),
|
size: 18,
|
||||||
value: 'All')
|
)
|
||||||
]..addAll(groupList.groups
|
],
|
||||||
.map<PopupMenuEntry<String>>(
|
)),
|
||||||
(e) => PopupMenuItem(
|
itemBuilder: (context) => [
|
||||||
value: e.name,
|
PopupMenuItem(
|
||||||
child: Text(e.name)))
|
child: Text('All'),
|
||||||
.toList()),
|
value: 'All')
|
||||||
onSelected: (value) {
|
]..addAll(groupList.groups
|
||||||
if (value == 'All') {
|
.map<PopupMenuEntry<String>>(
|
||||||
setState(() {
|
(e) => PopupMenuItem(
|
||||||
_groupName = 'All';
|
value: e.name,
|
||||||
_group = ['All'];
|
child: Text(e.name)))
|
||||||
});
|
.toList()),
|
||||||
} else {
|
onSelected: (value) {
|
||||||
groupList.groups.forEach((group) {
|
if (value == 'All') {
|
||||||
if (group.name == value) {
|
|
||||||
setState(() {
|
setState(() {
|
||||||
_groupName = value;
|
_groupName = 'All';
|
||||||
_group = group.podcastList;
|
_group = ['All'];
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
groupList.groups
|
||||||
|
.forEach((group) {
|
||||||
|
if (group.name == value) {
|
||||||
|
setState(() {
|
||||||
|
_groupName = value;
|
||||||
|
_group =
|
||||||
|
group.podcastList;
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
}
|
),
|
||||||
},
|
),
|
||||||
),
|
),
|
||||||
),
|
Spacer(),
|
||||||
),
|
FutureBuilder<int>(
|
||||||
Spacer(),
|
future: _getUpdateCounts(_group),
|
||||||
FutureBuilder<int>(
|
initialData: 0,
|
||||||
future: _getUpdateCounts(_group),
|
builder: (context, snapshot) {
|
||||||
initialData: 0,
|
return snapshot.data != 0
|
||||||
builder: (context, snapshot) {
|
? Material(
|
||||||
return snapshot.data != 0
|
color: Colors.transparent,
|
||||||
? Material(
|
child: IconButton(
|
||||||
color: Colors.transparent,
|
tooltip:
|
||||||
child: IconButton(
|
'Add new episodes to playlist',
|
||||||
tooltip:
|
icon:
|
||||||
'Add new episodes to playlist',
|
// Icon(Icons.playlist_add),
|
||||||
icon:
|
SizedBox(
|
||||||
// Icon(Icons.playlist_add),
|
height: 16,
|
||||||
SizedBox(
|
width: 21,
|
||||||
height: 16,
|
child: CustomPaint(
|
||||||
width: 21,
|
painter: AddToPlaylistPainter(
|
||||||
child: CustomPaint(
|
context
|
||||||
painter: AddToPlaylistPainter(
|
.textTheme
|
||||||
context
|
.bodyText1
|
||||||
.textTheme
|
.color,
|
||||||
.bodyText1
|
Colors
|
||||||
.color,
|
.red))),
|
||||||
Colors
|
onPressed: () async {
|
||||||
.red))),
|
await audio
|
||||||
onPressed: () async {
|
.addNewEpisode(
|
||||||
await audio
|
_group);
|
||||||
.addNewEpisode(
|
if (mounted)
|
||||||
_group);
|
setState(() {});
|
||||||
if (mounted)
|
Fluttertoast
|
||||||
setState(() {});
|
.showToast(
|
||||||
Fluttertoast.showToast(
|
msg: _groupName ==
|
||||||
msg: _groupName ==
|
'All'
|
||||||
'All'
|
? '${snapshot.data} episode added to playlist'
|
||||||
? '${snapshot.data} episode added to playlist'
|
: '${snapshot.data} episode in $_groupName added to playlist',
|
||||||
: '${snapshot.data} episode in $_groupName added to playlist',
|
gravity:
|
||||||
gravity: ToastGravity
|
ToastGravity
|
||||||
.BOTTOM,
|
.BOTTOM,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
: Material(
|
: Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
tooltip:
|
tooltip:
|
||||||
'Add new episodes to playlist',
|
'Add new episodes to playlist',
|
||||||
icon:
|
icon:
|
||||||
// Icon(Icons.playlist_add),
|
// Icon(Icons.playlist_add),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 16,
|
height: 16,
|
||||||
width: 21,
|
width: 21,
|
||||||
child:
|
child:
|
||||||
CustomPaint(
|
CustomPaint(
|
||||||
painter:
|
painter:
|
||||||
AddToPlaylistPainter(
|
AddToPlaylistPainter(
|
||||||
context
|
context
|
||||||
.textTheme
|
.textTheme
|
||||||
.bodyText1
|
.bodyText1
|
||||||
.color,
|
.color,
|
||||||
context
|
context
|
||||||
.textTheme
|
.textTheme
|
||||||
.bodyText1
|
.bodyText1
|
||||||
.color,
|
.color,
|
||||||
))),
|
))),
|
||||||
onPressed: () {}),
|
onPressed: () {}),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
Material(
|
Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
tooltip: 'Change layout',
|
tooltip: 'Change layout',
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (_layout == Layout.three)
|
if (_layout == Layout.three)
|
||||||
setState(() {
|
setState(() {
|
||||||
_layout = Layout.two;
|
_layout = Layout.two;
|
||||||
});
|
});
|
||||||
else
|
else
|
||||||
setState(() {
|
setState(() {
|
||||||
_layout = Layout.three;
|
_layout = Layout.three;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
icon: _layout == Layout.three
|
icon: _layout == Layout.three
|
||||||
? SizedBox(
|
? SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
width: 30,
|
width: 30,
|
||||||
child: CustomPaint(
|
child: CustomPaint(
|
||||||
painter: LayoutPainter(
|
painter: LayoutPainter(
|
||||||
0,
|
0,
|
||||||
context.textTheme
|
context
|
||||||
.bodyText1.color),
|
.textTheme
|
||||||
),
|
.bodyText1
|
||||||
)
|
.color),
|
||||||
: SizedBox(
|
),
|
||||||
height: 10,
|
)
|
||||||
width: 30,
|
: SizedBox(
|
||||||
child: CustomPaint(
|
height: 10,
|
||||||
painter: LayoutPainter(
|
width: 30,
|
||||||
1,
|
child: CustomPaint(
|
||||||
context.textTheme
|
painter: LayoutPainter(
|
||||||
.bodyText1.color),
|
1,
|
||||||
),
|
context
|
||||||
),
|
.textTheme
|
||||||
)),
|
.bodyText1
|
||||||
],
|
.color),
|
||||||
)),
|
),
|
||||||
),
|
),
|
||||||
EpisodeGrid(
|
)),
|
||||||
episodes: snapshot.data,
|
],
|
||||||
layout: _layout,
|
)),
|
||||||
),
|
),
|
||||||
SliverList(
|
EpisodeGrid(
|
||||||
delegate: SliverChildBuilderDelegate(
|
episodes: snapshot.data,
|
||||||
(BuildContext context, int index) {
|
layout: _layout,
|
||||||
return _loadMore
|
),
|
||||||
? Container(
|
SliverList(
|
||||||
height: 2,
|
delegate: SliverChildBuilderDelegate(
|
||||||
child: LinearProgressIndicator())
|
(BuildContext context, int index) {
|
||||||
: Center();
|
return _loadMore
|
||||||
},
|
? Container(
|
||||||
childCount: 1,
|
height: 2,
|
||||||
),
|
child: LinearProgressIndicator())
|
||||||
),
|
: Center();
|
||||||
]),
|
},
|
||||||
)
|
childCount: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
},
|
||||||
|
))
|
||||||
: Center();
|
: Center();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@ -944,7 +960,7 @@ class _MyDownloadState extends State<_MyDownload>
|
|||||||
return episodes.length == 0
|
return episodes.length == 0
|
||||||
? SliverToBoxAdapter(
|
? SliverToBoxAdapter(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(top:100),
|
padding: EdgeInsets.only(top: 100),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
import 'package:flutter/foundation.dart';
|
|
||||||
|
|
||||||
enum ImportState{start, import, parse, complete, stop, error}
|
|
||||||
|
|
||||||
class ImportOmpl extends ChangeNotifier{
|
|
||||||
ImportState _importState = ImportState.stop;
|
|
||||||
String _rssTitle;
|
|
||||||
|
|
||||||
String get rsstitle => _rssTitle;
|
|
||||||
|
|
||||||
set rssTitle(String title){
|
|
||||||
_rssTitle = title;
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
ImportState get importState => _importState;
|
|
||||||
|
|
||||||
set importState(ImportState state){
|
|
||||||
if(_importState != state)
|
|
||||||
{_importState = state;
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -36,6 +36,7 @@ class SubscribeWorker extends ChangeNotifier {
|
|||||||
SubscribeItem _subscribeItem;
|
SubscribeItem _subscribeItem;
|
||||||
SubscribeItem _currentSubscribeItem = SubscribeItem('', '');
|
SubscribeItem _currentSubscribeItem = SubscribeItem('', '');
|
||||||
bool _created = false;
|
bool _created = false;
|
||||||
|
bool get created => _created;
|
||||||
|
|
||||||
setSubscribeItem(SubscribeItem item) async {
|
setSubscribeItem(SubscribeItem item) async {
|
||||||
_subscribeItem = item;
|
_subscribeItem = item;
|
||||||
@ -71,6 +72,7 @@ class SubscribeWorker extends ChangeNotifier {
|
|||||||
subIsolate = null;
|
subIsolate = null;
|
||||||
_currentSubscribeItem = SubscribeItem('', '');
|
_currentSubscribeItem = SubscribeItem('', '');
|
||||||
_created = false;
|
_created = false;
|
||||||
|
notifyListeners();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ class EpisodeGrid extends StatelessWidget {
|
|||||||
: episodes[index].primaryColor.colorizeLight();
|
: episodes[index].primaryColor.colorizeLight();
|
||||||
return FadeTransition(
|
return FadeTransition(
|
||||||
opacity: Tween<double>(
|
opacity: Tween<double>(
|
||||||
begin: 0,
|
begin: index < 12 ? 0 : 1,
|
||||||
end: 1,
|
end: 1,
|
||||||
).animate(animation),
|
).animate(animation),
|
||||||
child: Selector<AudioPlayerNotifier,
|
child: Selector<AudioPlayerNotifier,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user