Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
Merge branch 'gkd-kit:main' into com.csmbcx.candada
Browse files Browse the repository at this point in the history
  • Loading branch information
adproqwq authored Jan 29, 2024
2 parents 81bfeb5 + dcd0623 commit 7573475
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/globalGroups.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import apps from './rawApps';
import type { RawGlobalGroup } from './types';
import { OPEN_AD_ORDER } from './utils';

const diabledAppIds = [
'com.android.systemui', // 通知栏界面
Expand Down Expand Up @@ -31,7 +32,7 @@ const globalGroups: RawGlobalGroup[] = [
{
key: 0,
name: '开屏广告',
order: -1,
order: OPEN_AD_ORDER,
actionMaximum: 2,
matchTime: 10000,
resetMatch: 'app',
Expand Down
3 changes: 2 additions & 1 deletion src/rawApps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import picocolors from 'picocolors';
import { pinyin } from 'pinyin-pro';
import { walk } from './file';
import type { RawApp } from './types';
import { OPEN_AD_ORDER } from './utils';

const rawApps: RawApp[] = [];
for await (const tsFp of walk(process.cwd() + '/src/apps')) {
Expand All @@ -26,7 +27,7 @@ for await (const tsFp of walk(process.cwd() + '/src/apps')) {
if (!g.name.startsWith('开屏广告')) {
g.enable = false;
} else {
g.order = -1;
g.order = OPEN_AD_ORDER;
}
});
rawApps.push(appConfig);
Expand Down
2 changes: 2 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ export const tryRun = <T>(fc: () => T, fallbackFc: (e: unknown) => T) => {
return fallbackFc(e);
}
};

export const OPEN_AD_ORDER = -10;

0 comments on commit 7573475

Please sign in to comment.