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" />