Skip to content

Commit

Permalink
修复徽章列表判断
Browse files Browse the repository at this point in the history
修复徽章列表判断
  • Loading branch information
YingLing3 authored Jun 16, 2023
1 parent 87d0006 commit 3355404
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions skyBadge.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function startSky() {
break;
case "delete":
// let len = Object.keys(menu_map).length;
if (len > Object.keys(getMainMenu()).length) {
if (len > Object.keys(getMainMenu()).length + 1) {
delete_options = [];
storage_map = {};
Object.keys(menu_map).map(function (key, index) {
Expand Down Expand Up @@ -128,7 +128,7 @@ function startSky() {
// 更新徽章次数
// let len = Object.keys(menu_map).length;
console.log("len => " + len + " menuLen => " + Object.keys(getMenu()).length);
if (len > Object.keys(getMainMenu()).length) {
if (len > Object.keys(getMainMenu()).length + 1) {
update_options = [];
storage_map = {};
Object.keys(menu_map).map(function (key, index) {
Expand Down Expand Up @@ -177,7 +177,7 @@ function startSky() {
// 变更徽章位置
// let len = Object.keys(menu_map).length;
console.log("len => " + len + " menuLen => " + Object.keys(getMenu()).length);
if (len > Object.keys(getMainMenu()).length) {
if (len > Object.keys(getMainMenu()).length + 1) {
let sort_options = [];
let storage_map = global_option;//初始化
Object.keys(menu_map).map(function (key, index) {
Expand Down Expand Up @@ -231,7 +231,7 @@ function startSky() {
startSky();
break;
case "auto":
if (len > Object.keys(getMainMenu()).length) {
if (len > Object.keys(getMainMenu()).length + 1) {
auto_options = [];
//storage_map = {};
Object.keys(menu_map).map(function (key, index) {
Expand Down

0 comments on commit 3355404

Please sign in to comment.