|
@ -380,12 +380,14 @@ class ProfileFragment : Fragment(), OnRefreshListener, ConfirmDialogFragmentCall |
|
|
|
|
|
|
|
|
override fun onResume() { |
|
|
override fun onResume() { |
|
|
super.onResume() |
|
|
super.onResume() |
|
|
|
|
|
mainActivity.setToolbar(binding.toolbar, this) |
|
|
try { |
|
|
try { |
|
|
val backStackEntry = NavHostFragment.findNavController(this).currentBackStackEntry |
|
|
val backStackEntry = NavHostFragment.findNavController(this).currentBackStackEntry |
|
|
if (backStackEntry != null) { |
|
|
if (backStackEntry != null) { |
|
|
backStackSavedStateResultLiveData = backStackEntry.savedStateHandle.getLiveData("result") |
|
|
backStackSavedStateResultLiveData = backStackEntry.savedStateHandle.getLiveData("result") |
|
|
backStackSavedStateResultLiveData?.observe(viewLifecycleOwner, backStackSavedStateObserver) |
|
|
backStackSavedStateResultLiveData?.observe(viewLifecycleOwner, backStackSavedStateObserver) |
|
|
} |
|
|
} |
|
|
|
|
|
mainActivity.supportActionBar?.title = viewModel.username.value |
|
|
} catch (e: Exception) { |
|
|
} catch (e: Exception) { |
|
|
Log.e(TAG, "onResume: ", e) |
|
|
Log.e(TAG, "onResume: ", e) |
|
|
} |
|
|
} |
|
@ -439,7 +441,6 @@ class ProfileFragment : Fragment(), OnRefreshListener, ConfirmDialogFragmentCall |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private fun init() { |
|
|
private fun init() { |
|
|
mainActivity.setToolbar(binding.toolbar, this) |
|
|
|
|
|
binding.swipeRefreshLayout.setOnRefreshListener(this) |
|
|
binding.swipeRefreshLayout.setOnRefreshListener(this) |
|
|
disableDm = !isNavRootInCurrentTabs("direct_messages_nav_graph") |
|
|
disableDm = !isNavRootInCurrentTabs("direct_messages_nav_graph") |
|
|
setupHighlights() |
|
|
setupHighlights() |
|
|