From 1bbfaa7ce08dd8148267cff241f19c9332b25560 Mon Sep 17 00:00:00 2001 From: kaixed Date: Sun, 15 Dec 2024 23:16:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A5=BD=E5=8F=8B=E9=80=BB=E8=BE=91=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/kaixed/kchat/data/repository/ContactRepository.kt | 2 +- .../kaixed/kchat/ui/activity/ApplyFriendsDetailActivity.kt | 6 ------ .../java/com/kaixed/kchat/ui/fragment/ContactFragment.kt | 5 ----- app/src/main/res/layout/activity_apply_friends_detail.xml | 3 +-- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/com/kaixed/kchat/data/repository/ContactRepository.kt b/app/src/main/java/com/kaixed/kchat/data/repository/ContactRepository.kt index 22472df..0a06b5b 100644 --- a/app/src/main/java/com/kaixed/kchat/data/repository/ContactRepository.kt +++ b/app/src/main/java/com/kaixed/kchat/data/repository/ContactRepository.kt @@ -62,7 +62,7 @@ class ContactRepository { // 添加联系人 suspend fun addContact(contactId: String, message: String): Result { return apiCall( - apiCall = { contactApiService.addContact(contactId, getUsername(), message) }, + apiCall = { contactApiService.addContact(getUsername(), contactId, message) }, errorMessage = "添加联系人失败" ) } diff --git a/app/src/main/java/com/kaixed/kchat/ui/activity/ApplyFriendsDetailActivity.kt b/app/src/main/java/com/kaixed/kchat/ui/activity/ApplyFriendsDetailActivity.kt index 8a94650..55e9895 100644 --- a/app/src/main/java/com/kaixed/kchat/ui/activity/ApplyFriendsDetailActivity.kt +++ b/app/src/main/java/com/kaixed/kchat/ui/activity/ApplyFriendsDetailActivity.kt @@ -23,7 +23,6 @@ class ApplyFriendsDetailActivity : BaseActivity() { loadFriendRequest() } - override fun onStart() { - super.onStart() - loadFriendRequest() - } - override fun onDestroy() { super.onDestroy() LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(mReceiver); diff --git a/app/src/main/res/layout/activity_apply_friends_detail.xml b/app/src/main/res/layout/activity_apply_friends_detail.xml index d333000..7e52eb2 100644 --- a/app/src/main/res/layout/activity_apply_friends_detail.xml +++ b/app/src/main/res/layout/activity_apply_friends_detail.xml @@ -12,8 +12,7 @@ android:id="@+id/ctl" android:layout_width="match_parent" android:layout_height="wrap_content" - app:layout_constraintTop_toTopOf="parent" - app:titleIcon="@drawable/ic_more" /> + app:layout_constraintTop_toTopOf="parent" />