Skip to content

Commit

Permalink
video caching; some uis change
Browse files Browse the repository at this point in the history
  • Loading branch information
fuwa37 committed Jul 19, 2020
1 parent 1dd58a7 commit bd20173
Show file tree
Hide file tree
Showing 70 changed files with 380 additions and 587 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.2.0

* App icon added
* Some UIs change
* Caching video from network

## 0.1.0

* An adequate implementation of state management ([Provider](https://pub.dev/packages/provider)), TODO: better implementation
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Sauce finder
* [ ] More configurations in Options
* [x] ~~Add tooltip to explain each of options~~
* [ ] Implement on-the-air update (auto-updater)
* [ ] App's logo
* [x] ~~App's icon~~
* [ ] **Better app's icon**
* [ ] App's about page
* [ ] Search's history
* [ ] **Better state management**
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
</manifest>
Binary file added android/app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary file added assets/app_icon.png
Binary file added assets/background.png
Binary file added assets/foreground.png
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
6 changes: 3 additions & 3 deletions lib/common/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class NoInfoException implements Exception {

String toString() {
if (message == null) return "Exception";
return "Couldn't get additional info :$message";
return "Couldn't get additional info : $message";
}
}

Expand All @@ -280,7 +280,7 @@ class NoResultException implements Exception {

String toString() {
if (message == null) return "Exception";
return "Couldn't get result :$message";
return "Couldn't get result : $message";
}
}

Expand Down Expand Up @@ -313,7 +313,7 @@ properImageHelp(BuildContext context, ScrollController _helpController) {
style: {
'p': Style(
fontSize: FontSize(
14 * MediaQuery.of(context).textScaleFactor))
16 * MediaQuery.of(context).textScaleFactor))
},
)),
),
Expand Down
23 changes: 22 additions & 1 deletion lib/common/notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ class SearchOptionNotifier extends ChangeNotifier {
void setSauceNaoMask(String key, String val) {
sauceNaoMask[key] = val;
if (sauceNaoMask.values.contains('0')) {
isAllIndexes = null;
if (sauceNaoMask.values.contains('1')) {
isAllIndexes = null;
} else {
isAllIndexes = false;
}
} else {
isAllIndexes = true;
}
Expand All @@ -113,4 +117,21 @@ class SearchOptionNotifier extends ChangeNotifier {
isAllIndexes = _isAllIndexes();
notifyListeners();
}
}

class GifNotifier extends ChangeNotifier {
int imageIdx = 0;
bool isRepeated = false;

void setImageIdx(int idx) {
if (imageIdx == idx) return;
imageIdx = idx;
notifyListeners();
}

void setRepeated(bool val) {
if (isRepeated == val) return;
isRepeated = val;
notifyListeners();
}
}
19 changes: 14 additions & 5 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ class _HomePageState extends State<HomePage> {
style: {
'p': Style(
fontSize: FontSize(
14 * MediaQuery.of(context).textScaleFactor))
16 * MediaQuery.of(context).textScaleFactor))
},
)),
action: null);
Expand Down Expand Up @@ -633,7 +633,7 @@ class _HomePageState extends State<HomePage> {
style: {
'p': Style(
fontSize: FontSize(
14 * MediaQuery.of(context).textScaleFactor))
16 * MediaQuery.of(context).textScaleFactor))
},
)),
),
Expand Down Expand Up @@ -673,7 +673,7 @@ class _HomePageState extends State<HomePage> {
<p>Refer to <a href='https://saucenao.com/status.html'>Indexing Status</a> for why some indexes have not option in this app.</p>
<p>For more information: <a href='https://saucenao.com/about.html'>About SauceNAO</a></p>
<hr>
<p><a href='https://trace.moe/'><b>Trace</b></a>: Trace or WAIT(What Anime Is This?) is search engine for anime. Performs relatively better for searching anime and will return short video.
<p><a href='https://trace.moe/'><b>Trace</b></a>: Trace or WAIT(What Anime Is This?) is search engine for anime. Performs relatively better for searching anime and will return short video if available otherwise an image.
<p>For more information: <a href='https://trace.moe/about'>About Trace(WAIT)</a></p>
""",
onLinkTap: (url) {
Expand All @@ -683,7 +683,7 @@ class _HomePageState extends State<HomePage> {
style: {
'p': Style(
fontSize: FontSize(
14 * MediaQuery.of(context).textScaleFactor))
16 * MediaQuery.of(context).textScaleFactor))
},
)),
),
Expand Down Expand Up @@ -890,7 +890,8 @@ class _HomePageState extends State<HomePage> {
),
title: Text("SauceNAO Indexes"),
),
expanded: Padding(
expanded: Container(
color: Colors.grey.withOpacity(0.25),
padding: EdgeInsets.only(left: 16, right: 16),
child: Wrap(
children: searchOptionNotifier.sauceNaoMask.entries
Expand Down Expand Up @@ -947,6 +948,14 @@ class _HomePageState extends State<HomePage> {
_panelController.close();
}
},
onLongPress: () {
if (_panelController.isPanelClosed) {
_panelController.open();
_expandableController.value = true;
} else {
_panelController.close();
}
},
child: Container(
child: Center(
child: Text(
Expand Down
110 changes: 0 additions & 110 deletions lib/main_test.dart

This file was deleted.

Loading

0 comments on commit bd20173

Please sign in to comment.