mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 11:38:51 +01:00
Crashlytics #862
This commit is contained in:
@@ -81,12 +81,12 @@ public class MainActivity extends QKActivity {
|
||||
ButterKnife.bind(this);
|
||||
|
||||
FragmentManager fm = getFragmentManager();
|
||||
mConversationList = (ConversationListFragment) fm.findFragmentById(R.id.content_frame);
|
||||
mConversationList = (ConversationListFragment) fm.findFragmentByTag(ConversationListFragment.TAG);
|
||||
if (mConversationList == null) {
|
||||
mConversationList = new ConversationListFragment();
|
||||
}
|
||||
FragmentTransaction menuTransaction = fm.beginTransaction();
|
||||
menuTransaction.replace(R.id.content_frame, mConversationList);
|
||||
menuTransaction.replace(R.id.content_frame, mConversationList, ConversationListFragment.TAG);
|
||||
menuTransaction.commit();
|
||||
|
||||
showDialogIfNeeded(savedInstanceState);
|
||||
|
||||
@@ -17,13 +17,13 @@ public class ComposeActivity extends QKSwipeBackActivity {
|
||||
setTitle(R.string.title_compose);
|
||||
|
||||
FragmentManager fm = getFragmentManager();
|
||||
mComposeFragment = (ComposeFragment) fm.findFragmentById(R.id.content_frame);
|
||||
mComposeFragment = (ComposeFragment) fm.findFragmentByTag(ComposeFragment.TAG);
|
||||
if (mComposeFragment == null) {
|
||||
mComposeFragment = new ComposeFragment();
|
||||
}
|
||||
|
||||
fm.beginTransaction()
|
||||
.replace(R.id.content_frame, mComposeFragment)
|
||||
.replace(R.id.content_frame, mComposeFragment, ComposeFragment.TAG)
|
||||
.commit();
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.moez.QKSMS.ui.view.StarredContactsView;
|
||||
public class ComposeFragment extends QKFragment implements ActivityLauncher, RecipientProvider,
|
||||
ComposeView.OnSendListener, AdapterView.OnItemClickListener {
|
||||
|
||||
private final String TAG = "ComposeFragment";
|
||||
public static final String TAG = "ComposeFragment";
|
||||
|
||||
private AutoCompleteContactView mRecipients;
|
||||
private ComposeView mComposeView;
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ import java.util.Observer;
|
||||
public class ConversationListFragment extends QKFragment implements LoaderManager.LoaderCallbacks<Cursor>,
|
||||
RecyclerCursorAdapter.ItemClickListener<Conversation>, RecyclerCursorAdapter.MultiSelectListener, Observer {
|
||||
|
||||
private final String TAG = "ConversationList";
|
||||
public static final String TAG = "ConversationListFragment";
|
||||
|
||||
@Bind(R.id.empty_state) View mEmptyState;
|
||||
@Bind(R.id.empty_state_icon) ImageView mEmptyStateIcon;
|
||||
|
||||
@@ -82,13 +82,13 @@ public class MessageListActivity extends QKSwipeBackActivity {
|
||||
if (mThreadId != -1) {
|
||||
Log.v(TAG, "Opening thread: " + mThreadId);
|
||||
FragmentManager fm = getFragmentManager();
|
||||
MessageListFragment fragment = (MessageListFragment) fm.findFragmentById(R.id.content_frame);
|
||||
MessageListFragment fragment = (MessageListFragment) fm.findFragmentByTag(MessageListFragment.TAG);
|
||||
if (fragment == null) {
|
||||
fragment = MessageListFragment.getInstance(mThreadId, mRowId, mHighlight, mShowImmediate);
|
||||
}
|
||||
mSwipeBackLayout.setScrollChangedListener(fragment);
|
||||
FragmentTransaction menuTransaction = fm.beginTransaction();
|
||||
menuTransaction.replace(R.id.content_frame, fragment);
|
||||
menuTransaction.replace(R.id.content_frame, fragment, MessageListFragment.TAG);
|
||||
menuTransaction.commit();
|
||||
} else {
|
||||
String msg = "Couldn't open conversation: {action:";
|
||||
|
||||
@@ -85,7 +85,7 @@ public class MessageListFragment extends QKFragment implements ActivityLauncher,
|
||||
LoaderManager.LoaderCallbacks<Cursor>, RecyclerCursorAdapter.MultiSelectListener, SwipeBackLayout.ScrollChangedListener,
|
||||
RecyclerCursorAdapter.ItemClickListener<MessageItem> {
|
||||
|
||||
private final String TAG = "MessageListFragment";
|
||||
public static final String TAG = "MessageListFragment";
|
||||
|
||||
private static final int MESSAGE_LIST_QUERY_TOKEN = 9527;
|
||||
private static final int MESSAGE_LIST_QUERY_AFTER_DELETE_TOKEN = 9528;
|
||||
|
||||
@@ -17,13 +17,13 @@ public class SearchActivity extends QKSwipeBackActivity {
|
||||
setTitle(R.string.title_search);
|
||||
|
||||
FragmentManager fm = getFragmentManager();
|
||||
mSearchFragment = (SearchFragment) fm.findFragmentById(R.id.content_frame);
|
||||
mSearchFragment = (SearchFragment) fm.findFragmentByTag(SearchFragment.TAG);
|
||||
if (mSearchFragment == null) {
|
||||
mSearchFragment = new SearchFragment();
|
||||
}
|
||||
|
||||
fm.beginTransaction()
|
||||
.replace(R.id.content_frame, mSearchFragment)
|
||||
.replace(R.id.content_frame, mSearchFragment, SearchFragment.TAG)
|
||||
.commit();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ import java.util.HashMap;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class SearchFragment extends QKFragment implements RecyclerCursorAdapter.ItemClickListener<SearchData> {
|
||||
public static final String TAG = "SearchFragment";
|
||||
|
||||
private AsyncQueryHandler mQueryHandler;
|
||||
|
||||
// Track which TextView's show which Contact objects so that we can update
|
||||
|
||||
@@ -14,13 +14,13 @@ public class SettingsActivity extends QKSwipeBackActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
FragmentManager fm = getFragmentManager();
|
||||
mSettingsFragment = (SettingsFragment) fm.findFragmentById(R.id.content_frame);
|
||||
mSettingsFragment = (SettingsFragment) fm.findFragmentByTag(SettingsFragment.TAG);
|
||||
if (mSettingsFragment == null) {
|
||||
mSettingsFragment = SettingsFragment.newInstance(R.xml.settings_main);
|
||||
}
|
||||
|
||||
fm.beginTransaction()
|
||||
.replace(R.id.content_frame, mSettingsFragment)
|
||||
.replace(R.id.content_frame, mSettingsFragment, SettingsFragment.TAG)
|
||||
.commit();
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ import java.util.Stack;
|
||||
|
||||
public class SettingsFragment extends PreferenceFragment implements Preference.OnPreferenceChangeListener,
|
||||
Preference.OnPreferenceClickListener {
|
||||
private final String TAG = "PreferenceFragment";
|
||||
public static final String TAG = "SettingsFragment";
|
||||
|
||||
public static final String CATEGORY_APPEARANCE = "pref_key_category_appearance";
|
||||
public static final String CATEGORY_THEME = "pref_category_theme";
|
||||
|
||||
Reference in New Issue
Block a user