File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
app/src/main/java/one/mixin/android/ui/home Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,14 @@ class ConversationListFragment : LinkFragment() {
177177 private var enterJob: Job ? = null
178178
179179 companion object {
180- fun newInstance () = ConversationListFragment ()
180+ @Volatile
181+ private var INSTANCE : ConversationListFragment ? = null
182+
183+ fun getInstance (): ConversationListFragment {
184+ return INSTANCE ? : synchronized(this ) {
185+ INSTANCE ? : ConversationListFragment ().also { INSTANCE = it }
186+ }
187+ }
181188
182189 const val TAG = " ConversationListFragment"
183190
Original file line number Diff line number Diff line change @@ -983,7 +983,7 @@ class MainActivity : BlazeBaseActivity() {
983983 }
984984
985985 private val conversationListFragment by lazy {
986- ConversationListFragment ()
986+ ConversationListFragment .getInstance ()
987987 }
988988
989989 private val walletFragment by lazy {
You can’t perform that action at this time.
0 commit comments