mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-23 06:08:52 +01:00
Fixed casting issues
This commit is contained in:
@@ -3,17 +3,16 @@ package com.moez.QKSMS.ui.base;
|
|||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import com.moez.QKSMS.QKSMSApp;
|
import com.moez.QKSMS.QKSMSApp;
|
||||||
import com.moez.QKSMS.ui.MainActivity;
|
|
||||||
import com.squareup.leakcanary.RefWatcher;
|
import com.squareup.leakcanary.RefWatcher;
|
||||||
|
|
||||||
public class QKFragment extends Fragment {
|
public class QKFragment extends Fragment {
|
||||||
|
|
||||||
protected MainActivity mContext;
|
protected QKActivity mContext;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
mContext = (MainActivity) getActivity();
|
mContext = (QKActivity) getActivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -622,7 +622,7 @@ public class MessageListFragment extends QKContentFragment implements ActivityLa
|
|||||||
makeCall();
|
makeCall();
|
||||||
return true;
|
return true;
|
||||||
case R.id.menu_delete_conversation:
|
case R.id.menu_delete_conversation:
|
||||||
DialogHelper.showDeleteConversationDialog(mContext, mThreadId);
|
DialogHelper.showDeleteConversationDialog((MainActivity) mContext, mThreadId);
|
||||||
return true;
|
return true;
|
||||||
case R.id.menu_details:
|
case R.id.menu_details:
|
||||||
mConversationDetailsDialog.showDetails(mConversation);
|
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
|
// The last message in this converation was just deleted. Send the user
|
||||||
// to the conversation list.
|
// to the conversation list.
|
||||||
mContext.showMenu();
|
((MainActivity) mContext).showMenu();
|
||||||
}
|
}
|
||||||
cursor.close();
|
cursor.close();
|
||||||
}
|
}
|
||||||
@@ -1362,7 +1362,7 @@ public class MessageListFragment extends QKContentFragment implements ActivityLa
|
|||||||
Conversation.init(mContext);
|
Conversation.init(mContext);
|
||||||
|
|
||||||
// Go back to the conversation list
|
// Go back to the conversation list
|
||||||
mContext.showMenu();
|
((MainActivity) mContext).showMenu();
|
||||||
} else if (token == DELETE_MESSAGE_TOKEN) {
|
} else if (token == DELETE_MESSAGE_TOKEN) {
|
||||||
// Check to see if we just deleted the last message
|
// Check to see if we just deleted the last message
|
||||||
startMsgListQuery(MESSAGE_LIST_QUERY_AFTER_DELETE_TOKEN);
|
startMsgListQuery(MESSAGE_LIST_QUERY_AFTER_DELETE_TOKEN);
|
||||||
|
|||||||
Reference in New Issue
Block a user