From a07711d9939762d0b326c3468d90ded05b699eab Mon Sep 17 00:00:00 2001 From: kaixed Date: Thu, 21 Nov 2024 23:09:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=A5=BD=E5=8F=8B=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.新增删除好友功能 2.更新CustomItem显示样式 --- .idea/deploymentTargetSelector.xml | 4 +- app/objectbox-models/default.json | 7 +- app/objectbox-models/default.json.bak | 102 +++--- app/src/main/AndroidManifest.xml | 13 +- .../data/objectbox/entity/Conversation.kt | 1 + .../model/friend/AcceptContactRequest.kt | 5 +- .../model/friend/ContactRequestResponse.kt | 2 +- .../model/response/friend/DeleteContact.kt | 7 + .../network/service/ContactApiService.kt | 12 +- .../kchat/network/service/UserApiService.kt | 7 + .../kchat/repository/ContactRepository.kt | 27 +- .../kaixed/kchat/repository/UserRepository.kt | 11 + .../kaixed/kchat/service/WebSocketService.kt | 59 +++- .../activity/ApproveContactRequestActivity.kt | 43 ++- .../ui/activity/ApproveDetailActivity.kt | 29 +- .../kaixed/kchat/ui/activity/ChatActivity.kt | 26 +- ...ivity.kt => ContactRequestListActivity.kt} | 31 +- .../ui/activity/ContactsDetailActivity.kt | 14 + .../kchat/ui/activity/DataSettingActivity.kt | 92 +++++- .../kaixed/kchat/ui/activity/MainActivity.kt | 2 +- .../ui/activity/ProfileDetailActivity.kt | 1 + .../ui/activity/SetRemarkAndLabelActivity.kt | 22 ++ ...dapter.kt => ContactRequestListAdapter.kt} | 8 +- .../kchat/ui/adapter/FriendListAdapter.kt | 57 +++- .../kchat/ui/fragment/ContactFragment.kt | 100 ++++-- .../kaixed/kchat/ui/fragment/HomeFragment.kt | 62 ++-- .../com/kaixed/kchat/ui/widget/CustomItem.kt | 29 ++ .../kaixed/kchat/ui/widget/CustomTitleBar.kt | 7 +- .../kaixed/kchat/ui/widget/ShSwitchView.kt | 3 +- .../java/com/kaixed/kchat/utils/WidgetUtil.kt | 4 +- .../kaixed/kchat/utils/handle/ContactUtil.kt | 36 ++ .../kchat/viewmodel/ContactViewModel.kt | 82 ++++- .../kaixed/kchat/viewmodel/UserViewModel.kt | 22 ++ .../activity_approve_contact_request.xml | 51 ++- .../res/layout/activity_approve_detail.xml | 19 +- ....xml => activity_contact_request_list.xml} | 2 +- .../res/layout/activity_contacts_detail.xml | 3 +- .../main/res/layout/activity_data_setting.xml | 126 +++---- .../main/res/layout/activity_friend_list.xml | 40 --- .../main/res/layout/activity_profile_test.xml | 310 ------------------ .../layout/activity_set_remark_and_label.xml | 172 ++++++++++ .../main/res/layout/dialog_delete_contact.xml | 89 +++++ app/src/main/res/layout/fragment_contact.xml | 15 +- app/src/main/res/layout/fragment_mine.xml | 1 - .../main/res/layout/friend_recycle_item.xml | 23 ++ .../friend_recycle_item_add_request.xml | 8 +- .../main/res/layout/function_grid_item.xml | 5 +- app/src/main/res/layout/item_custom.xml | 36 +- app/src/main/res/values/attr.xml | 2 + app/src/main/res/values/colors.xml | 1 + 50 files changed, 1194 insertions(+), 636 deletions(-) create mode 100644 app/src/main/java/com/kaixed/kchat/model/response/friend/DeleteContact.kt rename app/src/main/java/com/kaixed/kchat/ui/activity/{MessageActivity.kt => ContactRequestListActivity.kt} (60%) create mode 100644 app/src/main/java/com/kaixed/kchat/ui/activity/SetRemarkAndLabelActivity.kt rename app/src/main/java/com/kaixed/kchat/ui/adapter/{MessageListAdapter.kt => ContactRequestListAdapter.kt} (90%) create mode 100644 app/src/main/java/com/kaixed/kchat/utils/handle/ContactUtil.kt rename app/src/main/res/layout/{activity_message.xml => activity_contact_request_list.xml} (94%) delete mode 100644 app/src/main/res/layout/activity_friend_list.xml delete mode 100644 app/src/main/res/layout/activity_profile_test.xml create mode 100644 app/src/main/res/layout/activity_set_remark_and_label.xml create mode 100644 app/src/main/res/layout/dialog_delete_contact.xml diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml index dac19fa..879a3da 100644 --- a/.idea/deploymentTargetSelector.xml +++ b/.idea/deploymentTargetSelector.xml @@ -4,10 +4,10 @@