use of com.abewy.android.apps.klyph.facebook.IFbPermissionWorker in project Klyph by jonathangerbaud.
the class UserTimeline method handleNewPostClick.
private void handleNewPostClick() {
pendingAnnounce = false;
Session session = Session.getActiveSession();
List<String> permissions = session.getPermissions();
if (!permissions.containsAll(PERMISSIONS)) {
pendingAnnounce = true;
((IFbPermissionWorker) getActivity()).requestPublishPermissions(this, PERMISSIONS);
return;
}
if (getIntentParam() == KlyphBundleExtras.USER_ID) {
if (getElementId().equals(KlyphSession.getSessionUserId())) {
Intent intent = new Intent(getActivity(), PostActivity.class);
intent.putExtra(getIntentParam(), getElementId());
startActivityForResult(intent, POST_CODE);
} else {
publishFeedDialog();
}
} else {
Intent intent = new Intent(getActivity(), PostActivity.class);
intent.putExtra(getIntentParam(), getElementId());
startActivityForResult(intent, POST_CODE);
}
}
Aggregations