Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 81 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,24 @@ on:
tags:
- '20*'
workflow_dispatch:
inputs:
platform:
description: 'Platform to build'
required: true
default: 'all'
type: choice
options:
- all
- linux-android
- windows

permissions:
contents: write

jobs:
build:
build-linux-android:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || inputs.platform == 'all' || inputs.platform == 'linux-android' }}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -71,15 +82,82 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts
name: release-artifacts-linux-android
path: release-artifacts/*

build-windows:
runs-on: windows-latest
if: ${{ github.event_name == 'push' || inputs.platform == 'all' || inputs.platform == 'windows' }}

steps:
- uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: Enable Windows Desktop
run: flutter config --enable-windows-desktop

- name: Get Dependencies
run: flutter pub get

- name: Build Windows Release
run: flutter build windows --release

- name: Create MSIX
run: dart run msix:create --install-certificate false

- name: Separate MSIX and Compress Windows Build
run: |
Move-Item -Path build/windows/x64/runner/Release/*.msix -Destination DailyAL-Windows-x64.msix
Compress-Archive -Path build/windows/x64/runner/Release/* -DestinationPath DailyAL-Windows-x64.zip

- name: Generate SHA1 Checksums
run: |
Get-FileHash DailyAL-Windows-x64.zip -Algorithm SHA1 | Select-Object -ExpandProperty Hash > DailyAL-Windows-x64.zip.sha1
Get-FileHash DailyAL-Windows-x64.msix -Algorithm SHA1 | Select-Object -ExpandProperty Hash > DailyAL-Windows-x64.msix.sha1

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts-windows
path: |
DailyAL-Windows-x64.msix
DailyAL-Windows-x64.msix.sha1
DailyAL-Windows-x64.zip
DailyAL-Windows-x64.zip.sha1

release:
needs: [build-linux-android, build-windows]
runs-on: ubuntu-latest
if: ${{ always() && startsWith(github.ref, 'refs/tags/20') }}

steps:
- name: Download Linux/Android Artifacts
if: ${{ needs.build-linux-android.result == 'success' }}
uses: actions/download-artifact@v4
with:
name: release-artifacts-linux-android
path: release-artifacts

- name: Download Windows Artifacts
if: ${{ needs.build-windows.result == 'success' }}
uses: actions/download-artifact@v4
with:
name: release-artifacts-windows
path: release-artifacts

- name: Create Release
if: startsWith(github.ref, 'refs/tags/20')
uses: softprops/action-gh-release@v1
with:
files: |
release-artifacts/app-release.apk
release-artifacts/app-release.apk.sha1
release-artifacts/DailyAL-x86_64.AppImage
release-artifacts/DailyAL-x86_64.AppImage.sha1
release-artifacts/DailyAL-Windows-x64.msix
release-artifacts/DailyAL-Windows-x64.msix.sha1
release-artifacts/DailyAL-Windows-x64.zip
release-artifacts/DailyAL-Windows-x64.zip.sha1
25 changes: 20 additions & 5 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "9f455d2486bcb28cad87b062475f42edc959f636"
revision: "3b62efc2a3da49882f43c372e0bc53daef7295a6"
channel: "stable"

project_type: app
Expand All @@ -13,11 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 9f455d2486bcb28cad87b062475f42edc959f636
base_revision: 9f455d2486bcb28cad87b062475f42edc959f636
create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
- platform: android
create_revision: 9f455d2486bcb28cad87b062475f42edc959f636
base_revision: 9f455d2486bcb28cad87b062475f42edc959f636
create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
- platform: ios
create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
- platform: linux
create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
- platform: macos
create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
- platform: web
create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
- platform: windows
create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6

# User provided section

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package io.github.dailyanimelist

import io.flutter.embedding.android.FlutterActivity

class MainActivity : FlutterActivity()
12 changes: 12 additions & 0 deletions ios/RunnerTests/RunnerTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Flutter
import UIKit
import XCTest

class RunnerTests: XCTestCase {

func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}

}
24 changes: 22 additions & 2 deletions lib/cache/cachemanager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,38 @@ class CacheManager {
Future<String> getBackUpData() async {
final pref = await _pref;
final allData = <String, String>{};
final keys = [

// Fixed keys that should always be backed up
final fixedKeys = [
'user',
StreamUtils.i.key(StreamType.book_marks),
'${UserContentBuilder.serviceName} - anime-@me',
'${UserContentBuilder.serviceName} - manga-@me',
];
for (var key in keys) {

// Get all keys from SharedPreferences
final allKeys = pref.getKeys();

// Combine fixed keys with dynamic private notes
final keysToBackup = <String>{...fixedKeys};

// Add all private note keys
for (var key in allKeys) {
// The key format in setValueForService is "$serviceName - $key"
// So for 'private_note', it is "private_note - 123"
if (key.startsWith('private_note - ')) {
keysToBackup.add(key);
}
}

// Collect data for all keys
for (var key in keysToBackup) {
String? data = pref.get(key)?.toString();
if (data != null) {
allData[key] = data;
}
}

return jsonEncode(allData);
}

Expand Down
41 changes: 22 additions & 19 deletions lib/constant.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1067,25 +1067,28 @@ Future<dynamic> showContentEditSheet(
return showCupertinoDialog(
context: context,
barrierDismissible: true,
builder: (context) => AnimatedPadding(
padding: MediaQuery.of(context).viewInsets,
duration: const Duration(milliseconds: 100),
curve: Curves.decelerate,
child: ContentEditWidget(
category: category,
showAdditional: true,
contentDetailed: content,
isCacheRefreshed: true,
updateCache: updateCache,
onDelete: () {
if (onDelete != null) onDelete();
},
onListStatusChange: (status) {
if (onListStatusChange != null) onListStatusChange(status);
},
onUpdate: (value) {
if (onUpdate != null) onUpdate(value);
},
builder: (context) => Scaffold(
backgroundColor: Colors.transparent,
resizeToAvoidBottomInset: true,
body: GestureDetector(
onTap: () => Navigator.pop(context),
behavior: HitTestBehavior.opaque,
child: ContentEditWidget(
category: category,
showAdditional: true,
contentDetailed: content,
isCacheRefreshed: true,
updateCache: updateCache,
onDelete: () {
if (onDelete != null) onDelete();
},
onListStatusChange: (status) {
if (onListStatusChange != null) onListStatusChange(status);
},
onUpdate: (value) {
if (onUpdate != null) onUpdate(value);
},
),
),
));
}
Expand Down
32 changes: 32 additions & 0 deletions lib/generated/intl/messages_ar_EG.dart
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ class MessageLookup extends MessageLookupByLibrary {
"دعم تطوير هذا التطبيق هنا",
),
"CGDCT": MessageLookupByLibrary.simpleMessage("CGDCT"),
"Calendar": MessageLookupByLibrary.simpleMessage("تقويم"),
"Cancel": MessageLookupByLibrary.simpleMessage("يلغي"),
"Cancelled_Restore": MessageLookupByLibrary.simpleMessage(
"تم إلغاء الاستعادة",
Expand Down Expand Up @@ -378,6 +379,7 @@ class MessageLookup extends MessageLookupByLibrary {
"هل ترغب في تسجيل الخروج؟",
),
"Doujunshi": MessageLookupByLibrary.simpleMessage("طريقة الاتجاه"),
"Download_ICS": MessageLookupByLibrary.simpleMessage("تحميل .ics"),
"Drag_the_field": MessageLookupByLibrary.simpleMessage(
"اسحب الحقل أو استخدم مفاتيح الأسهم لتحريك الحقل",
),
Expand Down Expand Up @@ -443,6 +445,9 @@ class MessageLookup extends MessageLookupByLibrary {
"Error_Adding_Event_To_Calendar": MessageLookupByLibrary.simpleMessage(
"خطأ في إضافة حدث إلى التقويم",
),
"Error_Saving_File": MessageLookupByLibrary.simpleMessage(
"خطأ في حفظ الملف!",
),
"Error_removing_image": MessageLookupByLibrary.simpleMessage(
"حدث خطأ أثناء إزالة الصورة",
),
Expand Down Expand Up @@ -493,6 +498,9 @@ class MessageLookup extends MessageLookupByLibrary {
),
"Female": MessageLookupByLibrary.simpleMessage("أنثى"),
"Figures": MessageLookupByLibrary.simpleMessage("الأرقام"),
"File_Saved": MessageLookupByLibrary.simpleMessage(
"تم حفظ الملف في مجلد التنزيل!",
),
"Filter": MessageLookupByLibrary.simpleMessage("منقي"),
"Filter_After_search": MessageLookupByLibrary.simpleMessage(
"سيتم استخدام هذه المرشحات عند إجراء البحث التالي",
Expand Down Expand Up @@ -1056,6 +1064,16 @@ class MessageLookup extends MessageLookupByLibrary {
"Priority_level_qn": MessageLookupByLibrary.simpleMessage(
"ما هو مستوى أولويتك لمشاهدة / قراءة هذا؟",
),
"Private_Note": MessageLookupByLibrary.simpleMessage("ملاحظة خاصة"),
"Private_Note_Desc": MessageLookupByLibrary.simpleMessage(
"يتم حفظها محليًا، ولن يتم إرسالها إلى الخوادم أبدًا",
),
"Private_Note_Hint": MessageLookupByLibrary.simpleMessage(
"اكتب ملاحظتك الخاصة هنا...",
),
"Private_Note_Local_Only": MessageLookupByLibrary.simpleMessage(
"هذه الملاحظة محلية فقط ولن يتمت مزامنتها.",
),
"Profile": MessageLookupByLibrary.simpleMessage("الملف الشخصي"),
"Profile_Page": MessageLookupByLibrary.simpleMessage("الصفحة الشخصية"),
"Profile_bg_removed": MessageLookupByLibrary.simpleMessage(
Expand Down Expand Up @@ -1191,6 +1209,7 @@ class MessageLookup extends MessageLookupByLibrary {
"Sci_fi": MessageLookupByLibrary.simpleMessage("SCI-FI."),
"Score": MessageLookupByLibrary.simpleMessage("نتيجة"),
"Score_Distribution": MessageLookupByLibrary.simpleMessage("توزيع النتيجة"),
"Score_Stats": MessageLookupByLibrary.simpleMessage("إحصائيات النتيجة"),
"Screening": MessageLookupByLibrary.simpleMessage("تحري"),
"Search": MessageLookupByLibrary.simpleMessage("يبحث"),
"SearchBarHintText": MessageLookupByLibrary.simpleMessage(
Expand Down Expand Up @@ -1270,6 +1289,7 @@ class MessageLookup extends MessageLookupByLibrary {
"ضبط مهلة.حاول مرة اخرى.",
),
"Share": MessageLookupByLibrary.simpleMessage("يشارك"),
"Share_ICS": MessageLookupByLibrary.simpleMessage("مشاركة .ics"),
"Shoujo": MessageLookupByLibrary.simpleMessage("شوجو"),
"Should_be_aplhanumeric": MessageLookupByLibrary.simpleMessage(
"يجب أن تكون أبجدية رقمية",
Expand Down Expand Up @@ -1298,7 +1318,16 @@ class MessageLookup extends MessageLookupByLibrary {
"Show_Original": MessageLookupByLibrary.simpleMessage(
"إظهار النسخة الأصلية",
),
"Show_Private_Review": MessageLookupByLibrary.simpleMessage(
"إظهار الملاحظة الخاصة",
),
"Show_Private_Review_Desc": MessageLookupByLibrary.simpleMessage(
"إظهار حقل الملاحظة الخاصة في شاشة التحرير",
),
"Show_Spoiler": MessageLookupByLibrary.simpleMessage("عرض المفسد"),
"Show_dub_status_AnimeList_Desc": MessageLookupByLibrary.simpleMessage(
"إظهار حالة الدبلجة (الإنجليزية) لأنيمي في القائمة",
),
"Show_priority_in_anime_manga_list": MessageLookupByLibrary.simpleMessage(
"إظهار الأولوية في قائمة أنيمي / مانغا",
),
Expand Down Expand Up @@ -1538,6 +1567,9 @@ class MessageLookup extends MessageLookupByLibrary {
"Video_Game": MessageLookupByLibrary.simpleMessage("لعبة فيديو"),
"Videos": MessageLookupByLibrary.simpleMessage("أشرطة فيديو"),
"View_All": MessageLookupByLibrary.simpleMessage("عرض الكل"),
"View_Related_Graph_Tooltip": MessageLookupByLibrary.simpleMessage(
"عرض الرسم البياني أنيمي / مانغا ذات الصلة",
),
"View_all_Discussions": MessageLookupByLibrary.simpleMessage(
"عرض جميع المناقشات",
),
Expand Down
Loading