Compare commits

..

7 Commits

Author SHA1 Message Date
ynyx631
d22501198a Fix chinese character issue when compressing files. Close #565 2025-10-26 20:38:58 +08:00
09a1d2821c Enhance onResponse handling in ImageDownloader to support Future and validate result type 2025-10-19 21:50:27 +08:00
nyne
7842b5a1ac Merge pull request #571 from Ftbom/master
调整多收藏夹漫画源的收藏状态显示逻辑
2025-10-19 15:06:18 +08:00
Ftbom
079f574e2f improve network favorite handling in comic details page 2025-10-19 12:23:37 +08:00
GitHub Action
b08f11f6ac Updated source with latest release 2025-10-13 21:24:05 +08:00
nyne
cd925df125 Change base branch from main to master in workflow 2025-10-13 21:19:14 +08:00
nyne
8c87c4a906 Refactor AltStore update workflow script 2025-10-13 21:14:30 +08:00
6 changed files with 66 additions and 96 deletions

View File

@@ -31,30 +31,30 @@ jobs:
- name: Update AltStore source - name: Update AltStore source
id: update_source id: update_source
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
python update_alt_store.py python update_alt_store.py
git config --global user.name 'GitHub Action' git config --global user.name 'GitHub Action'
git config --global user.email 'action@github.com' git config --global user.email 'action@github.com'
git add alt_store.json git add alt_store.json
if git diff --staged --quiet; then if git diff --staged --quiet; then
echo "changes=false" >> $GITHUB_OUTPUT echo "changes=false" >> $GITHUB_OUTPUT
else else
# Create a new branch for the PR # Create a new branch for the PR
branch_name="update-altstore-$(date +%Y%m%d-%H%M%S)" branch_name="update-altstore-$(date +%Y%m%d-%H%M%S)"
git checkout -b "$branch_name" git checkout -b "$branch_name"
git commit -m "Updated source with latest release" git commit -m "Updated source with latest release"
git push -u origin "$branch_name" git push -u origin "$branch_name"
# Create PR using GitHub CLI # Create PR using GitHub CLI
gh pr create \ gh pr create \
--title "Update AltStore source with latest release" \ --title "Update AltStore source with latest release" \
--body "This PR updates the alt_store.json file with the latest release information." \ --body "This PR updates the alt_store.json file with the latest release information." \
--head "$branch_name" \ --head "$branch_name" \
--base main --base master
echo "changes=true" >> $GITHUB_OUTPUT echo "changes=true" >> $GITHUB_OUTPUT
fi fi
- name: Calculate job duration - name: Calculate job duration
id: duration id: duration

View File

@@ -13,15 +13,15 @@
"bundleIdentifier": "com.github.wgh136.venera", "bundleIdentifier": "com.github.wgh136.venera",
"developerName": "wgh136", "developerName": "wgh136",
"subtitle": "A comic reader that supports reading local and network comics", "subtitle": "A comic reader that supports reading local and network comics",
"version": "1.4.5", "version": "1.5.3",
"versionDate": "2025-06-18", "versionDate": "2025-10-13",
"versionDescription": "1. Fixed an abnormal single image height issue when \"imagesPerPage > 1\". 379 \r\n2. Fixed an invalid page calculation issue when \"showSingleImageOnFirstPage\" is enabled. \r\n3. Fixed an issue with incorrect reading history when displaying a single image on the first page. \r\n4. Fixed abnormal history recording when pages are not flipped. 392 \r\n5. Fixed an issue where the download task would stop after exiting the reader. 387 \r\n6. Fixed a \"RangeError\" when translating tags. 356 \r\n7. Reset the current folder to null on the favorites page if the folder is invalid. 389 \r\n8. Fixed various issues when using a custom download path on Android. 400 \r\n9. Set the initial chapter to the first downloaded chapter if no history exists when starting to read a local comic. 405 \r\n10. Removed the config file repository URL from the app.", "versionDescription": "1. Fix an issue where the app freezes after swiping back on Android. 544\r\n2. Enable minification when building for Android. 547\r\n3. Prevent the app from creating an archive download task when the archive URL is an empty string.",
"downloadURL": "https://github.com/venera-app/venera/releases/download/v1.4.5/venera-ios-1.4.5%2B145.ipa", "downloadURL": "https://github.com/venera-app/venera/releases/download/v1.5.3/venera-ios-1.5.3%2B153.ipa",
"localizedDescription": "A comic reader that supports reading local and network comics", "localizedDescription": "A comic reader that supports reading local and network comics",
"iconURL": "https://raw.githubusercontent.com/venera-app/venera/master/assets/app_icon.png", "iconURL": "https://raw.githubusercontent.com/venera-app/venera/master/assets/app_icon.png",
"tintColor": "#0784FC", "tintColor": "#0784FC",
"category": "utilities", "category": "utilities",
"size": 14960268, "size": 15047841,
"appPermissions": { "appPermissions": {
"entitlements": [ "entitlements": [
"application-identifier", "application-identifier",
@@ -39,6 +39,13 @@
} }
}, },
"versions": [ "versions": [
{
"version": "1.5.3",
"date": "2025-10-13",
"localizedDescription": "1. Fix an issue where the app freezes after swiping back on Android. 544\r\n2. Enable minification when building for Android. 547\r\n3. Prevent the app from creating an archive download task when the archive URL is an empty string.",
"downloadURL": "https://github.com/venera-app/venera/releases/download/v1.5.3/venera-ios-1.5.3%2B153.ipa",
"size": 15047841
},
{ {
"version": "1.4.5", "version": "1.4.5",
"date": "2025-06-18", "date": "2025-06-18",
@@ -59,6 +66,16 @@
"tintColor": "#0784FC", "tintColor": "#0784FC",
"title": "v1.4.5 - Venera 18/06/25", "title": "v1.4.5 - Venera 18/06/25",
"url": "https://github.com/venera-app/venera/releases/tag/v1.4.5" "url": "https://github.com/venera-app/venera/releases/tag/v1.4.5"
},
{
"appID": "com.github.wgh136.venera",
"caption": "Update of Venera just got released!",
"date": "2025-10-13T12:47:27Z",
"identifier": "release-v1.5.3",
"notify": true,
"tintColor": "#0784FC",
"title": "v1.5.3 - Venera 13/10/25",
"url": "https://github.com/venera-app/venera/releases/tag/v1.5.3"
} }
] ]
} }

View File

@@ -181,7 +181,15 @@ abstract class ImageDownloader {
} }
if (configs['onResponse'] is JSInvokable) { if (configs['onResponse'] is JSInvokable) {
buffer = (configs['onResponse'] as JSInvokable)([Uint8List.fromList(buffer)]); dynamic result = (configs['onResponse'] as JSInvokable)([Uint8List.fromList(buffer)]);
if (result is Future) {
result = await result;
}
if (result is List<int>) {
buffer = result;
} else {
throw "Error: Invalid onResponse result.";
}
(configs['onResponse'] as JSInvokable).free(); (configs['onResponse'] as JSInvokable).free();
} }

View File

@@ -197,11 +197,12 @@ class _NetworkSectionState extends State<_NetworkSection> {
if (res.subData is List) { if (res.subData is List) {
final list = List<String>.from(res.subData); final list = List<String>.from(res.subData);
if (list.isNotEmpty) { if (list.isNotEmpty) {
addedFolders = {list.first}; addedFolders = list.toSet();
localIsFavorite = true;
} else { } else {
addedFolders.clear(); addedFolders.clear();
localIsFavorite = false;
} }
localIsFavorite = addedFolders.isNotEmpty;
} else { } else {
addedFolders.clear(); addedFolders.clear();
localIsFavorite = false; localIsFavorite = false;
@@ -352,62 +353,6 @@ class _NetworkSectionState extends State<_NetworkSection> {
} }
Widget _buildMultiFolder() { Widget _buildMultiFolder() {
if (localIsFavorite == true &&
widget.comicSource.favoriteData!.singleFolderForSingleComic) {
return ListTile(
title: Row(
children: [
Text("Network Favorites".tl),
const SizedBox(width: 8),
Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: context.colorScheme.primaryContainer,
borderRadius: BorderRadius.circular(12),
),
child: Text("Added".tl, style: ts.s12),
),
],
),
trailing: isLoading
? const SizedBox(
width: 20,
height: 20,
child: CircularProgressIndicator(strokeWidth: 2),
)
: _HoverButton(
isFavorite: true,
onTap: () async {
setState(() {
isLoading = true;
});
var res = await widget
.comicSource
.favoriteData!
.addOrDelFavorite!(widget.cid, '', false, null);
if (res.success) {
// Invalidate network cache so subsequent loads see latest
NetworkCacheManager().clear();
setState(() {
localIsFavorite = false;
});
widget.onFavorite(false);
App.rootContext.showMessage(message: "Removed".tl);
if (appdata.settings['autoCloseFavoritePanel'] ?? false) {
context.pop();
}
} else {
context.showMessage(message: res.errorMessage!);
}
setState(() {
isLoading = false;
});
},
),
);
}
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@@ -425,8 +370,10 @@ class _NetworkSectionState extends State<_NetworkSection> {
var name = entry.value; var name = entry.value;
var id = entry.key; var id = entry.key;
var isAdded = addedFolders.contains(id); var isAdded = addedFolders.contains(id);
var hasSelection = addedFolders.isNotEmpty; // When `singleFolderForSingleComic` is `false`, all add and remove buttons are clickable.
var enabled = !hasSelection || isAdded; // When `singleFolderForSingleComic` is `true`, the remove button is always clickable,
// while the add button is only clickable if the comic has not been added to any list.
var enabled = !(widget.comicSource.favoriteData!.singleFolderForSingleComic && addedFolders.isNotEmpty && !isAdded);
return ListTile( return ListTile(
title: Row( title: Row(
@@ -469,11 +416,9 @@ class _NetworkSectionState extends State<_NetworkSection> {
NetworkCacheManager().clear(); NetworkCacheManager().clear();
setState(() { setState(() {
if (isAdded) { if (isAdded) {
addedFolders.clear(); addedFolders.remove(id);
} else { } else {
addedFolders addedFolders.add(id);
..clear()
..add(id);
} }
// sync local flag for single-folder-per-comic logic and parent // sync local flag for single-folder-per-comic logic and parent
localIsFavorite = addedFolders.isNotEmpty; localIsFavorite = addedFolders.isNotEmpty;

View File

@@ -1126,10 +1126,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: zip_flutter name: zip_flutter
sha256: c4d5a34c5803def866bc550926bb16fe89717c9b7304695d5b2ede30964eb8a8 sha256: baecf8deb6bf53a50e5ab513707ab56cc0c25f5b43333aa56ef562e8e7057357
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.0.12" version: "0.0.13"
sdks: sdks:
dart: ">=3.8.0 <4.0.0" dart: ">=3.8.0 <4.0.0"
flutter: ">=3.35.5" flutter: ">=3.35.5"

View File

@@ -53,7 +53,7 @@ dependencies:
sliver_tools: ^0.2.12 sliver_tools: ^0.2.12
flutter_file_dialog: ^3.0.2 flutter_file_dialog: ^3.0.2
file_selector: ^1.0.3 file_selector: ^1.0.3
zip_flutter: ^0.0.12 zip_flutter: ^0.0.13
lodepng_flutter: lodepng_flutter:
git: git:
url: https://github.com/venera-app/lodepng_flutter url: https://github.com/venera-app/lodepng_flutter