mirror of
https://gitee.com/openharmony/applications_mms
synced 2024-11-23 07:39:46 +00:00
版权头、稳定性修复
Signed-off-by: zhouhongli2023 <zhouhongli5@huawei.com>
This commit is contained in:
parent
577c9249dc
commit
3851692f2f
1
OAT.xml
1
OAT.xml
@ -40,6 +40,7 @@
|
|||||||
<filteritem type="filepath" name="entry/.*.json5" desc="build config file"/>
|
<filteritem type="filepath" name="entry/.*.json5" desc="build config file"/>
|
||||||
<filteritem type="filepath" name="entry/src/main/ets/MainAbility/workers/.*.js" desc="worker file"/>
|
<filteritem type="filepath" name="entry/src/main/ets/MainAbility/workers/.*.js" desc="worker file"/>
|
||||||
<filteritem type="filepath" name="entry/src/main/.*.json5" desc="build config file"/>
|
<filteritem type="filepath" name="entry/src/main/.*.json5" desc="build config file"/>
|
||||||
|
<filteritem type="filename" name="hvigorfile.js" desc="Build Files"/>
|
||||||
</filefilter>
|
</filefilter>
|
||||||
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
||||||
</filefilter>
|
</filefilter>
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
import AbilityStage from '@ohos.app.ability.UIAbility'
|
import AbilityStage from '@ohos.app.ability.UIAbility'
|
||||||
import notification from '@ohos.notificationManager';
|
import notification from '@ohos.notificationManager';
|
||||||
|
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
import Ability from '@ohos.app.ability.UIAbility'
|
import Ability from '@ohos.app.ability.UIAbility'
|
||||||
import Window from '@ohos.window'
|
import Window from '@ohos.window'
|
||||||
|
|
||||||
|
@ -1335,7 +1335,13 @@ export default class ConversationController {
|
|||||||
|
|
||||||
getSendMessageId(initDatas, telephone): number {
|
getSendMessageId(initDatas, telephone): number {
|
||||||
for (let initData of initDatas) {
|
for (let initData of initDatas) {
|
||||||
|
if (initData == undefined || initData == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (initData.telephone == telephone) {
|
if (initData.telephone == telephone) {
|
||||||
|
if (initData.id == undefined || initData.id == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
return initData.id;
|
return initData.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1359,6 +1365,9 @@ export default class ConversationController {
|
|||||||
"content": content,
|
"content": content,
|
||||||
};
|
};
|
||||||
let id: number = this.getSendMessageId(initDatas, sendNumbers[i]);
|
let id: number = this.getSendMessageId(initDatas, sendNumbers[i]);
|
||||||
|
if (id == undefined || id == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let sendResult: LooseObject = {
|
let sendResult: LooseObject = {
|
||||||
"id": id,
|
"id": id,
|
||||||
"telephone": sendNumbers[i],
|
"telephone": sendNumbers[i],
|
||||||
@ -1464,7 +1473,19 @@ export default class ConversationController {
|
|||||||
// Check whether the time on the top of each SMS message is displayed.
|
// Check whether the time on the top of each SMS message is displayed.
|
||||||
setDateShow(item, list) {
|
setDateShow(item, list) {
|
||||||
item.dateShow = true;
|
item.dateShow = true;
|
||||||
|
if (item.date == undefined || item.date == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (item.date.id == undefined || item.date.id == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let tempDateId = item.date.id;
|
let tempDateId = item.date.id;
|
||||||
|
if (item.week == undefined || item.week == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (item.week.id == undefined || item.week.id == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let tempWeekId = item.week.id;
|
let tempWeekId = item.week.id;
|
||||||
if (list.length > 0) {
|
if (list.length > 0) {
|
||||||
item.dateShow =
|
item.dateShow =
|
||||||
@ -1700,6 +1721,12 @@ export default class ConversationController {
|
|||||||
this.threadId = result.rowId;
|
this.threadId = result.rowId;
|
||||||
this.portraitColor = AvatarColor.background.Color[Math.abs(this.threadId) % 6];
|
this.portraitColor = AvatarColor.background.Color[Math.abs(this.threadId) % 6];
|
||||||
item.groupId = result.groupId;
|
item.groupId = result.groupId;
|
||||||
|
if (result.initDatas[0] == undefined || result.initDatas[0] == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (result.initDatas[0].id == undefined || result.initDatas[0].id == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
item.id = result.initDatas[0].id;
|
item.id = result.initDatas[0].id;
|
||||||
this.refresh = !this.refresh
|
this.refresh = !this.refresh
|
||||||
// Sending and processing the sending result
|
// Sending and processing the sending result
|
||||||
@ -1827,6 +1854,12 @@ export default class ConversationController {
|
|||||||
}
|
}
|
||||||
let number: string = telephoneUtil.dealTelephoneSort(telephone);
|
let number: string = telephoneUtil.dealTelephoneSort(telephone);
|
||||||
ConversationListService.getInstance().querySessionByTelephone(number, res => {
|
ConversationListService.getInstance().querySessionByTelephone(number, res => {
|
||||||
|
if (res.response == undefined || res.response == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.response.id == undefined || res.response.id == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
HiLog.i(TAG, "queryOldMessageList, querySessionByTelephone res.response.id: " + res.response.id);
|
HiLog.i(TAG, "queryOldMessageList, querySessionByTelephone res.response.id: " + res.response.id);
|
||||||
if (res.code == common.int.SUCCESS && res.response.id > 0) {
|
if (res.code == common.int.SUCCESS && res.response.id > 0) {
|
||||||
if (this.threadId != res.response.id) {
|
if (this.threadId != res.response.id) {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,2 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
|
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
|
||||||
module.exports = require('@ohos/hvigor-ohos-plugin').appTasks
|
module.exports = require('@ohos/hvigor-ohos-plugin').appTasks
|
Loading…
Reference in New Issue
Block a user