!314 设置时间后back到中间界面不能立即更新,代码合入release

Merge pull request !314 from SEASON_SYSU/cherry-pick-1677143627
This commit is contained in:
openharmony_ci
2023-02-25 07:38:33 +00:00
committed by Gitee
4 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -146,8 +146,8 @@ class WindowManager {
}
async setWindowBgColor(name: WindowType, bgColor: string): void {
let window = await Window.find(name)
window.setWindowBackgroundColor(bgColor);
let window = await Window.find(name)
window.setWindowBackgroundColor(bgColor);
}
@@ -21,7 +21,7 @@ const TAG = 'ManagementComponent-NoDisturbComponent';
@Component
export default struct NoDisturbComponent {
@State mViewModel: ViewModel = new ViewModel()
@State @Watch('onRefresh') refreshRequest: number= 0
@Prop @Watch('onRefresh') refreshRequest: number
mPrevReapMode: number = 0;
mPrevStartTime: Date= new Date()
mPrevEndTime: Date= new Date()
@@ -36,7 +36,7 @@ export default struct NoDisturbComponent {
this.mRefreshCnt++;
}
onRefresh(propName: string): void {
onRefresh(): void {
Log.showInfo(TAG, `onRefresh`);
this.mViewModel.viewModelInit();
this.mPrevGetCnt = 0;
@@ -11,17 +11,17 @@ export default class IndicatorStyle {
/**
* 圆点圆角半径
*/
static readonly indicatorBorderRadius = '11px';
static readonly indicatorBorderRadius = '3vp';
/**
* 圆点距离顶部尺寸
*/
static readonly indicatorTopMargin = '10px';
static readonly indicatorTopMargin = '3.5vp';
/**
* 圆点距离右侧尺寸
*/
static readonly indicatorRightMargin = '150px';
static readonly indicatorRightMargin = '37.5vp';
}
/**
@@ -26,11 +26,11 @@ export default struct PrivacyIndicatorComponent {
this.mViewModel = new ViewModel();
this.mViewModel.setCallback((type) => {
if (type == IndicatorType.TYPE_ORANGE) {
this.mBackgroundColor = $r("app.color.indicator_color_orange");
this.mBackgroundColor = $r("sys.color.ohos_id_color_alert");
} else if (type == IndicatorType.TYPE_GREEN) {
this.mBackgroundColor = $r("app.color.indicator_color_green");
this.mBackgroundColor = $r("sys.color.ohos_id_color_connected");
} else if (type == IndicatorType.TYPE_BLUE) {
this.mBackgroundColor = $r("app.color.indicator_color_blue");
this.mBackgroundColor = $r("sys.color.ohos_id_color_activated");
} else {
// 不显示
this.mBackgroundColor = $r("app.color.transparent");