Skip to content

Commit

Permalink
Merge pull request #22 from Aoi-hosizora/dev.v1.2.2
Browse files Browse the repository at this point in the history
Merge dev.v1.2.2 branch
  • Loading branch information
Aoi-hosizora authored Dec 20, 2022
2 parents bd0bc63 + b951060 commit 0c09f99
Show file tree
Hide file tree
Showing 102 changed files with 5,789 additions and 3,368 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@

### Dependencies

+ See [pubspec.yaml](./pubspec.yaml).
+ Development environment: `Flutter 2.10.5 channel stable / Dart 2.16.2`
+ Visit [pubspec.yaml](./pubspec.yaml) for packages.

### Install

+ See [Release](https://github.com/Aoi-hosizora/manhuagui_flutter/releases).
+ Visit [Release](https://github.com/Aoi-hosizora/manhuagui_flutter/releases) for versions.

### Screenshots

Expand Down
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ android {

defaultConfig {
applicationId 'com.aoihosizora.manhuagui'
// applicationId 'com.aoihosizora.manhuagui_test'
versionCode 5
versionName '1.2.1'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import java.io.File
class MainActivity: FlutterActivity(), MethodCallHandler {
companion object {
private const val CHANNEL = "com.aoihosizora.manhuagui"
private const val RESTART_APP_METHOD = "restartApp"
private const val INSERT_MEDIA_METHOD = "insertMedia"
}

Expand All @@ -23,11 +24,19 @@ class MainActivity: FlutterActivity(), MethodCallHandler {

override fun onMethodCall(call: MethodCall, result: MethodResult) {
when (call.method) {
RESTART_APP_METHOD -> {
// https://github.com/gabrimatic/restart_app/blob/master/android/src/main/kotlin/gabrimatic/info/restart/RestartPlugin.kt
val component = (context.packageManager.getLaunchIntentForPackage(context.packageName))!!.component
val intent = Intent.makeRestartActivityTask(component)
context.startActivity(intent)
Runtime.getRuntime().exit(0)
result.success(true)
}
INSERT_MEDIA_METHOD -> {
// https://github.com/CarnegieTechnologies/gallery_saver/blob/master/android/src/main/kotlin/carnegietechnologies/gallery_saver/FileUtils.kt
// https://github.com/hui-z/image_gallery_saver/blob/master/android/src/main/kotlin/com/example/imagegallerysaver/ImageGallerySaverPlugin.kt
// https://developer.android.com/training/camera/photobasics#TaskGallery
val filepath = call.argument<Any>("filepath").toString() ?: ""
val filepath = call.argument<Any>("filepath")?.toString() ?: ""
val intent = Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE)
val f = File(filepath)
intent.data = Uri.fromFile(f)
Expand Down
17 changes: 8 additions & 9 deletions lib/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
const APP_NAME = 'Manhuagui';
const APP_VERSION = '1.2.1';
const APP_LEGALESE = 'Copyright © 2020-2022 AoiHosizora';
const APP_DESCRIPTIONS = [
'第三方漫画柜 ($WEB_HOMEPAGE_URL) 安卓客户端,使用 Flutter 开发。',
'作者:GitHub @Aoi-hosizora (青いほしぞら) <aoihosizora@hotmail.com>',
' ',
'该客户端仅供学习使用,仅供非商业用途。',
' ',
'本应用与漫画柜内容提供方无任何关系,若有问题,请发邮件或 Issue 联系。',
];
const APP_DESCRIPTION = //
'第三方漫画柜 ($WEB_HOMEPAGE_URL) 安卓客户端,使用 Flutter 开发。\n'
'作者:GitHub @Aoi-hosizora (青いほしぞら) <aoihosizora@hotmail.com>\n'
'\n'
'该客户端仅供学习使用,仅供非商业用途。\n'
'\n'
'本应用与漫画柜内容提供方无任何关系,若有问题,请发邮件或 Issue 联系。';

const ASSETS_PREFIX = 'lib/assets/';
const DB_NAME = 'db_manhuagui';
Expand Down Expand Up @@ -41,5 +40,5 @@ const MESSAGE_URL = 'https://www.manhuagui.com/user/message/system';
const EDIT_PROFILE_URL = 'https://www.manhuagui.com/user/center/proinfo';
const REGISTER_URL = 'https://www.manhuagui.com/user/register';
const SOURCE_CODE_URL = 'https://github.com/Aoi-hosizora/manhuagui_flutter';
const FEEDBACK_URL = 'https://github.com/Aoi-hosizora/manhuagui_flutter/issues/new';
const FEEDBACK_URL = 'https://github.com/Aoi-hosizora/manhuagui_flutter/issues';
const RELEASE_URL = 'https://github.com/Aoi-hosizora/manhuagui_flutter/releases';
Loading

0 comments on commit 0c09f99

Please sign in to comment.