fix: 修复搜索添加好友逻辑错误

This commit is contained in:
糕小菜 2024-12-15 23:16:58 +08:00
parent 910d26c0f4
commit 1bbfaa7ce0
4 changed files with 2 additions and 14 deletions

View File

@ -62,7 +62,7 @@ class ContactRepository {
// 添加联系人
suspend fun addContact(contactId: String, message: String): Result<String?> {
return apiCall(
apiCall = { contactApiService.addContact(contactId, getUsername(), message) },
apiCall = { contactApiService.addContact(getUsername(), contactId, message) },
errorMessage = "添加联系人失败"
)
}

View File

@ -23,7 +23,6 @@ class ApplyFriendsDetailActivity : BaseActivity<ActivityApplyFriendsDetailBindin
enableEdgeToEdge()
setContent()
setOnClick()
}
@ -56,11 +55,6 @@ class ApplyFriendsDetailActivity : BaseActivity<ActivityApplyFriendsDetailBindin
}
}
binding.ctl.setOnSettingClickListener {
val intent = Intent(this, DataSettingActivity::class.java)
startActivity(intent)
}
binding.rlSetRemark.setOnClickListener {
val intent = Intent(this, SetRemarkActivity::class.java)
startActivity(intent)

View File

@ -68,11 +68,6 @@ class ContactFragment : BaseFragment<FragmentContactBinding>() {
loadFriendRequest()
}
override fun onStart() {
super.onStart()
loadFriendRequest()
}
override fun onDestroy() {
super.onDestroy()
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(mReceiver);

View File

@ -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" />
<androidx.constraintlayout.utils.widget.ImageFilterView
android:id="@+id/ifv_avatar"