Merge branch 'dev' of github.com:refilc/naplo into dev

This commit is contained in:
Kima
2024-03-03 23:33:11 +01:00
34 changed files with 57 additions and 46 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
extensions:

View File

@@ -16,7 +16,7 @@ import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:connectivity_plus/connectivity_plus.dart';
class FilcAPI {
class reFilcAPI {
// API base
static const baseUrl = "https://api.refilc.hu";

View File

@@ -18,7 +18,7 @@ class AdProvider extends ChangeNotifier {
}
Future<void> fetch() async {
_ads = await FilcAPI.getAds() ?? [];
_ads = await reFilcAPI.getAds() ?? [];
_ads.sort((a, b) => -a.date.compareTo(b.date));
// check for new ads

View File

@@ -30,7 +30,7 @@ class NewsProvider extends ChangeNotifier {
var seen_ = Provider.of<SettingsProvider>(_context, listen: false).seenNews;
if (seen_.isEmpty) {
var news_ = await FilcAPI.getNews();
var news_ = await reFilcAPI.getNews();
if (news_ != null) {
_news = news_;
show = true;
@@ -43,7 +43,7 @@ class NewsProvider extends ChangeNotifier {
}
Future<void> fetch() async {
var news_ = await FilcAPI.getNews();
var news_ = await reFilcAPI.getNews();
if (news_ == null) return;
show = false;

View File

@@ -28,7 +28,7 @@ class UpdateProvider extends ChangeNotifier {
if (!Platform.isAndroid) return;
_releases = await FilcAPI.getReleases() ?? [];
_releases = await reFilcAPI.getReleases() ?? [];
_releases.sort((a, b) => -a.version.compareTo(b.version));
// Check for new releases

View File

@@ -86,7 +86,7 @@ class App extends StatelessWidget {
final premium = PremiumProvider(settings: settings);
WidgetsBinding.instance.addPostFrameCallback((_) {
FilcAPI.getConfig(settings).then((Config? config) {
reFilcAPI.getConfig(settings).then((Config? config) {
if (config != null) settings.update(config: config);
});
premium.activate();

View File

@@ -50,7 +50,7 @@ extension UpdateHelper on Release {
}
Future<Uint8List> download({UpdateCallback? updateCallback}) async {
var response = await FilcAPI.downloadRelease(downloads.first);
var response = await reFilcAPI.downloadRelease(downloads.first);
List<List<int>> chunks = [];
int downloaded = 0;

View File

@@ -160,6 +160,11 @@ flutter:
- asset: assets/fonts/SpaceMono/SpaceMono-BoldItalic.ttf
weight: 700
style: italic
- family: GeistMono
fonts:
- asset: assets/fonts/GeistMono/GeistMono-Regular.otf
weight: 500
flutter_launcher_icons:
image_path: assets/icons/ic_android.png