mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-30 11:34:43 +01:00
Add Gallery Layout to default post layout option.
This commit is contained in:
parent
52d6691ae7
commit
719a5a3a8e
@ -1730,6 +1730,14 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
|||||||
void delayTransition();
|
void delayTransition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void openViewPostDetailActivity(Post post, int position) {
|
||||||
|
Intent intent = new Intent(mActivity, ViewPostDetailActivity.class);
|
||||||
|
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_DATA, post);
|
||||||
|
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_LIST_POSITION, position);
|
||||||
|
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_FRAGMENT_ID, mFragment.getPostFragmentId());
|
||||||
|
mActivity.startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
public class PostBaseViewHolder extends RecyclerView.ViewHolder {
|
public class PostBaseViewHolder extends RecyclerView.ViewHolder {
|
||||||
MaterialCardView cardView;
|
MaterialCardView cardView;
|
||||||
AspectRatioGifImageView iconGifImageView;
|
AspectRatioGifImageView iconGifImageView;
|
||||||
@ -1864,11 +1872,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
|||||||
markPostRead(post, true);
|
markPostRead(post, true);
|
||||||
canStartActivity = false;
|
canStartActivity = false;
|
||||||
|
|
||||||
Intent intent = new Intent(mActivity, ViewPostDetailActivity.class);
|
openViewPostDetailActivity(post, getBindingAdapterPosition());
|
||||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_DATA, post);
|
|
||||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_LIST_POSITION, getBindingAdapterPosition());
|
|
||||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_FRAGMENT_ID, mFragment.getPostFragmentId());
|
|
||||||
mActivity.startActivity(intent);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -2881,11 +2885,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
|||||||
markPostRead(post, true);
|
markPostRead(post, true);
|
||||||
canStartActivity = false;
|
canStartActivity = false;
|
||||||
|
|
||||||
Intent intent = new Intent(mActivity, ViewPostDetailActivity.class);
|
openViewPostDetailActivity(post, getBindingAdapterPosition());
|
||||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_DATA, post);
|
|
||||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_LIST_POSITION, getBindingAdapterPosition());
|
|
||||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_FRAGMENT_ID, mFragment.getPostFragmentId());
|
|
||||||
mActivity.startActivity(intent);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -3476,11 +3476,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
|||||||
markPostRead(post, true);
|
markPostRead(post, true);
|
||||||
canStartActivity = false;
|
canStartActivity = false;
|
||||||
|
|
||||||
Intent intent = new Intent(mActivity, ViewPostDetailActivity.class);
|
openViewPostDetailActivity(post, getBindingAdapterPosition());
|
||||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_DATA, post);
|
|
||||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_LIST_POSITION, getBindingAdapterPosition());
|
|
||||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_FRAGMENT_ID, mFragment.getPostFragmentId());
|
|
||||||
mActivity.startActivity(intent);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -44,11 +44,13 @@
|
|||||||
<string-array name="settings_default_post_layout">
|
<string-array name="settings_default_post_layout">
|
||||||
<item>Card Layout</item>
|
<item>Card Layout</item>
|
||||||
<item>Compact Layout</item>
|
<item>Compact Layout</item>
|
||||||
|
<item>Gallery Layout</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="settings_default_post_layout_values">
|
<string-array name="settings_default_post_layout_values">
|
||||||
<item>0</item>
|
<item>0</item>
|
||||||
<item>1</item>
|
<item>1</item>
|
||||||
|
<item>2</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="settings_video_autoplay">
|
<string-array name="settings_video_autoplay">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user