Commit 360e477 1 parent 29a1f9d commit 360e477 Copy full SHA for 360e477
File tree 1 file changed +24
-0
lines changed
app/src/main/java/com/articrew/artic/ui/collect_archive
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,30 @@ class CollectArchiveDialogFragment : BottomSheetDialogFragment() {
36
36
37
37
}
38
38
39
+
40
+ // @수민) 새 아카이브를 만들고 돌아오면 서버에서 데이터를 다시 받아와서 RecyclerView를 설정해준다.
41
+ override fun onResume () {
42
+ super .onResume()
43
+
44
+ repository.getMyPageMe()
45
+ .subscribe(
46
+ {
47
+ if (it.isNotEmpty()) {
48
+ collectArchiveListAdapter.dataList = it
49
+ collectArchiveListAdapter.notifyDataSetChanged()
50
+
51
+ linear_dialog_put_archive_make_new_archive.visibility= View .GONE
52
+ }
53
+ else { // 내 아카이브가 없을 때
54
+ linear_dialog_put_archive_make_new_archive.visibility= View .VISIBLE
55
+ }
56
+ },
57
+ {
58
+ toast(R .string.network_error)
59
+ }
60
+ ).apply { compositeDisposable.add(this ) }
61
+ }
62
+
39
63
override fun onActivityCreated (savedInstanceState : Bundle ? ) {
40
64
super .onActivityCreated(savedInstanceState)
41
65
You can’t perform that action at this time.
0 commit comments