forked from upstream-mirrors/quik
Fixed casting issues
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user