Commit 3ffd3912 authored by Alexander Ivanov's avatar Alexander Ivanov

Move chat viewer option menu creation to fragment.

parent 41cbecc5
This diff is collapsed.
...@@ -18,6 +18,7 @@ import java.util.ArrayList; ...@@ -18,6 +18,7 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentActivity;
import android.view.Menu;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.BaseAdapter; import android.widget.BaseAdapter;
...@@ -120,6 +121,13 @@ public class ChatViewerAdapter extends BaseAdapter implements SaveStateAdapter, ...@@ -120,6 +121,13 @@ public class ChatViewerAdapter extends BaseAdapter implements SaveStateAdapter,
((ChatViewerFragment) view.getTag()).onChatChange(incomingMessage); ((ChatViewerFragment) view.getTag()).onChatChange(incomingMessage);
} }
/**
* Must be called on changes in chat (message sent, received, etc.).
*/
public void onPrepareOptionsMenu(View view, Menu menu) {
((ChatViewerFragment) view.getTag()).onPrepareOptionsMenu(menu);
}
@Override @Override
public void onChange() { public void onChange() {
activeChats = new ArrayList<AbstractChat>(MessageManager.getInstance() activeChats = new ArrayList<AbstractChat>(MessageManager.getInstance()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment