6.0.1 - Alpha2 - 修复global.sleep及global.toast方法绑定错误
This commit is contained in:
11
README.md
11
README.md
@@ -98,6 +98,12 @@
|
||||
|
||||
[comment]: <> "Version history only shows last 3 versions"
|
||||
|
||||
# v6.0.1 Alpha2
|
||||
|
||||
###### 2021/12/07
|
||||
|
||||
* `修复` global.sleep及global.toast方法绑定错误
|
||||
|
||||
# v6.0.1 Alpha
|
||||
|
||||
###### 2021/12/05
|
||||
@@ -109,6 +115,7 @@
|
||||
* `优化` 扩展global.toast支持时长控制/强制覆盖控制/dismiss方法
|
||||
* `优化` 包名对象全局化 (okhttp3/androidx/de)
|
||||
* `优化` 升级 Android Material 版本 1.5.0-beta01 -> 1.6.0-alpha01
|
||||
* `优化` 升级 Android Gradle 插件版本 7.2.0-alpha04 -> 7.2.0-alpha05
|
||||
|
||||
# v6.0.0
|
||||
|
||||
@@ -185,5 +192,9 @@
|
||||
|
||||
* [Auto.js](https://github.com/hyb1996/Auto.js-VSCode-Extension) { author: [hyb1996](https://github.com/hyb1996) }
|
||||
- `适用于 VS Code 的桌面开发插件`
|
||||
|
||||
* [AutoX](https://github.com/kkevsekk1/AutoX) { author: [kkevsekk1](https://github.com/kkevsekk1) }
|
||||
- `Auto.js 二次开发项目`
|
||||
|
||||
* [Auto.js-TypeScript-Declarations](https://github.com/SuperMonster003/Auto.js-TypeScript-Declarations) { author: [SuperMonster003](https://github.com/SuperMonster003) }
|
||||
- `Auto.js 声明文件 (.d.ts)`
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
******
|
||||
|
||||
# v6.0.1 Alpha
|
||||
# v6.0.1
|
||||
|
||||
###### 2021/12/05
|
||||
###### 2021/12/07
|
||||
|
||||
* `新增` polyfill (Object.getOwnPropertyDescriptors)
|
||||
* `新增` polyfill (Array.prototype.flat)
|
||||
@@ -15,6 +15,7 @@
|
||||
* `优化` 扩展global.toast支持时长控制/强制覆盖控制/dismiss方法
|
||||
* `优化` 包名对象全局化 (okhttp3/androidx/de)
|
||||
* `优化` 升级 Android Material 版本 1.5.0-beta01 -> 1.6.0-alpha01
|
||||
* `优化` 升级 Android Gradle 插件版本 7.2.0-alpha04 -> 7.2.0-alpha05
|
||||
|
||||
# v6.0.0
|
||||
|
||||
|
||||
@@ -88,11 +88,9 @@ public class ThemeColorHelper {
|
||||
|
||||
@TargetApi(21)
|
||||
public static void setStatusBarColor(Activity activity, int color) {
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
Window window = activity.getWindow();
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
window.setStatusBarColor(color);
|
||||
}
|
||||
Window window = activity.getWindow();
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
window.setStatusBarColor(color);
|
||||
}
|
||||
|
||||
public static void setBackgroundColor(View view, int color) {
|
||||
|
||||
@@ -159,11 +159,9 @@ public class ThemeColorManager {
|
||||
|
||||
@TargetApi(21)
|
||||
public static void add(Activity activity) {
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
activities.add(new WeakReference<>(activity));
|
||||
if (shouldApplyThemeColor())
|
||||
activity.getWindow().setStatusBarColor(themeColor.colorPrimary);
|
||||
}
|
||||
activities.add(new WeakReference<>(activity));
|
||||
if (shouldApplyThemeColor())
|
||||
activity.getWindow().setStatusBarColor(themeColor.colorPrimary);
|
||||
}
|
||||
|
||||
@TargetApi(21)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.stardust.theme.app;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -203,6 +204,7 @@ public class ColorSelectActivity extends AppCompatActivity {
|
||||
return mColors.get(mSelectedPosition).themeColor;
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
public void setSelectedPosition(int selectedPosition) {
|
||||
if (mSelectedPosition != SELECT_NONE) {
|
||||
int oldSelectedPosition = mSelectedPosition;
|
||||
@@ -211,7 +213,7 @@ public class ColorSelectActivity extends AppCompatActivity {
|
||||
getAdapter().notifyItemChanged(mSelectedPosition);
|
||||
} else {
|
||||
this.mSelectedPosition = selectedPosition;
|
||||
getAdapter().notifyDataSetChanged();
|
||||
Objects.requireNonNull(getAdapter()).notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
<string name="text_again_and_again">又双</string>
|
||||
<string name="text_again_and_again_again">又双叒</string>
|
||||
<string name="text_again_and_again_again_again">又双叒叕</string>
|
||||
<string name="debug">连接电脑</string>
|
||||
<string name="debug">连接到计算机</string>
|
||||
<string name="text_server_address">服务器地址</string>
|
||||
<string name="text_about_me_and_repo">关于项目与开发者</string>
|
||||
<string name="text_attribute">属性</string>
|
||||
|
||||
@@ -112,7 +112,7 @@ module.exports = function (runtime, global) {
|
||||
this.toast = $.toast.bind($);
|
||||
this.toast.dismiss = () => $.dismiss();
|
||||
return this.toast;
|
||||
}).apply(this, arguments);
|
||||
}.call(this)).apply(null, arguments);
|
||||
},
|
||||
toastLog(msg, is_long, is_forcible) {
|
||||
this.toast.apply(this, arguments);
|
||||
@@ -178,7 +178,7 @@ module.exports = function (runtime, global) {
|
||||
|
||||
(function $LazY() {
|
||||
return this.sleep = $.sleep.bind($);
|
||||
}).call(this, millis_min, millis_max);
|
||||
}).call(this).call(null, millis_min, millis_max);
|
||||
},
|
||||
isStopped() {
|
||||
return runtime.isStopped();
|
||||
|
||||
@@ -10,8 +10,6 @@ import android.os.Looper;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import kotlin.Suppress;
|
||||
|
||||
/**
|
||||
* Created by Stardust on 2017/8/4.
|
||||
*/
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user