backport requireActivity method
This commit is contained in:
parent
64a6edd3fb
commit
bd4d939a29
|
@ -3051,4 +3051,12 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
|
||||||
}
|
}
|
||||||
activity.switchToAccount(message.getConversation().getAccount(), fingerprint);
|
activity.switchToAccount(message.getConversation().getAccount(), fingerprint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Activity requireActivity() {
|
||||||
|
final Activity activity = getActivity();
|
||||||
|
if (activity == null) {
|
||||||
|
throw new IllegalStateException("Activity not attached");
|
||||||
|
}
|
||||||
|
return activity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue