Skip to content

Commit 445c3b2

Browse files
committed
Went back to using the UI thread for resurfacing fragments.
1 parent 820a206 commit 445c3b2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

fragmentboss/src/main/java/com/nothingworksright/fragmentboss/FragmentBoss.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public static void resurfaceFragmentInBackStack(final FragmentManager fm,
113113
final String desiredTagCombo) {
114114

115115
// Get a handler that can be used to post to the main thread
116-
//Handler handler = new Handler(Looper.getMainLooper());
116+
Handler handler = new Handler(Looper.getMainLooper());
117117
Runnable runnable = new Runnable() {
118118
@Override
119119
public void run() {
@@ -199,9 +199,7 @@ public void run() {
199199
}
200200
}
201201
};
202-
//handler.post(runnable);
203-
Thread thread = new Thread(runnable);
204-
thread.start();
202+
handler.post(runnable);
205203

206204
}
207205

0 commit comments

Comments
 (0)