Fixed casting issues

This commit is contained in:
Moez Bhatti
2015-09-04 20:57:02 -04:00
parent 8a2cd5bdc4
commit 83ac33c983
2 changed files with 5 additions and 6 deletions
@@ -3,17 +3,16 @@ package com.moez.QKSMS.ui.base;
import android.app.Fragment;
import android.os.Bundle;
import com.moez.QKSMS.QKSMSApp;
import com.moez.QKSMS.ui.MainActivity;
import com.squareup.leakcanary.RefWatcher;
public class QKFragment extends Fragment {
protected MainActivity mContext;
protected QKActivity mContext;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mContext = (MainActivity) getActivity();
mContext = (QKActivity) getActivity();
}
@Override
@@ -622,7 +622,7 @@ public class MessageListFragment extends QKContentFragment implements ActivityLa
makeCall();
return true;
case R.id.menu_delete_conversation:
DialogHelper.showDeleteConversationDialog(mContext, mThreadId);
DialogHelper.showDeleteConversationDialog((MainActivity) mContext, mThreadId);
return true;
case R.id.menu_details:
mConversationDetailsDialog.showDetails(mConversation);
@@ -1319,7 +1319,7 @@ public class MessageListFragment extends QKContentFragment implements ActivityLa
}
// The last message in this converation was just deleted. Send the user
// to the conversation list.
mContext.showMenu();
((MainActivity) mContext).showMenu();
}
cursor.close();
}
@@ -1362,7 +1362,7 @@ public class MessageListFragment extends QKContentFragment implements ActivityLa
Conversation.init(mContext);
// Go back to the conversation list
mContext.showMenu();
((MainActivity) mContext).showMenu();
} else if (token == DELETE_MESSAGE_TOKEN) {
// Check to see if we just deleted the last message
startMsgListQuery(MESSAGE_LIST_QUERY_AFTER_DELETE_TOKEN);