窗口回显时刷新到最新数据。

This commit is contained in:
ZhanGSKen
2025-07-27 15:37:40 +08:00
parent 23920a7ff1
commit ec18330022
4 changed files with 21 additions and 2 deletions

View File

@@ -40,6 +40,10 @@ public class CallLogAdapter extends RecyclerView.Adapter<CallLogAdapter.CallLogV
this.mContactUtils = ContactUtils.getInstance(mContext);
this.callLogList = callLogList;
}
public void relaodContacts() {
this.mContactUtils.relaodContacts();
}
@NonNull
@Override

View File

@@ -161,4 +161,12 @@ public class CallLogFragment extends Fragment {
_CallLogFragment.triggerUpdate();
}
}
@Override
public void onResume() {
super.onResume();
//ToastUtils.show("onResume");
callLogAdapter.relaodContacts();
readCallLog(); // 窗口回显时更新通话记录
}
}

View File

@@ -163,5 +163,12 @@ public class ContactsFragment extends Fragment {
}
contactAdapter.notifyDataSetChanged();
}
@Override
public void onResume() {
super.onResume();
//ToastUtils.show("onResume");
readContacts(); // 窗口回显时更新联系人列表
}
}