Skip to content

Commit

Permalink
snatcher fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NO-ob committed Mar 9, 2021
1 parent 4df12d1 commit 955a724
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
17 changes: 13 additions & 4 deletions lib/ImageWriter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,20 @@ class ImageWriter{
return result;
}
Future<bool> setPaths() async{
if (cacheRootPath == ""){
cacheRootPath = await serviceHandler.getCacheDir();
if(path == ""){
if (Platform.isAndroid){
path = await serviceHandler.getExtDir() + "/Pictures/LoliSnatcher/";
} else if (Platform.isLinux){
path = "${Platform.environment['HOME']}/Pictures/LoliSnatcher/";
}
}
if (path == ""){
path = await serviceHandler.getExtDir();

if(cacheRootPath == ""){
if (Platform.isAndroid){
cacheRootPath = await serviceHandler.getCacheDir();
} else if (Platform.isLinux){
cacheRootPath = "${Platform.environment['HOME']}/.loliSnatcher/cache/";
}
}
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/SettingsHandler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class SettingsHandler {
String? defTags = "rating:safe", previewMode = "Sample", videoCacheMode = "Stream", prefBooru = "", cachePath = "", previewDisplay = "Waterfall", galleryMode="Full Res", shareAction = "Ask";
int limit = 20, portraitColumns = 2,landscapeColumns = 4, preloadCount = 2, snatchCooldown = 250;
int SDKVer = 0;
String verStr = "1.7.7";
String verStr = "1.7.8";
List<Booru>? booruList = [];
/*static List<ThemeItem> themes = [
new ThemeItem("Pink", Colors.pink[200], Colors.pink[300]),
Expand Down
2 changes: 1 addition & 1 deletion lib/libBooru/BooruHandler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ abstract class BooruHandler {
String prevTags = "";
bool locked = false;
Booru booru;
String verStr = "1.7.7";
String verStr = "1.7.8";
List<BooruItem>? fetched;
bool tagSearchEnabled = true;
bool isActive = false;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies:
git:
url: "https://github.com/NANI-SORE/photo_view.git"
html: ^0.15.0
flutter_staggered_grid_view: ^0.4.0-nullsafety.3
flutter_staggered_grid_view: ^0.3.4
video_player: ^2.0.0
chewie: ^1.0.0
sqflite: ^2.0.0+2
Expand Down

0 comments on commit 955a724

Please sign in to comment.