mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
ircd:Ⓜ️:acquire: Add conditions to skip subroutine when opts cause overlap.
This commit is contained in:
parent
a029cdec5f
commit
c9b4fe6797
1 changed files with 15 additions and 0 deletions
|
@ -255,6 +255,21 @@ ircd::m::acquire::fetch_history(event::idx &ref_min)
|
||||||
void
|
void
|
||||||
ircd::m::acquire::acquire_timeline()
|
ircd::m::acquire::acquire_timeline()
|
||||||
{
|
{
|
||||||
|
// We only enter this routine if the options are sufficient. Otherwise
|
||||||
|
// the functionality here will overlap with acquire_history() and be
|
||||||
|
// a more expensive form of the same thing.
|
||||||
|
const bool sufficient_options
|
||||||
|
{
|
||||||
|
false
|
||||||
|
|| !opts.history
|
||||||
|
|| opts.viewport_size
|
||||||
|
|| opts.depth.first
|
||||||
|
|| opts.depth.second
|
||||||
|
};
|
||||||
|
|
||||||
|
if(!sufficient_options)
|
||||||
|
return;
|
||||||
|
|
||||||
event::idx ref_min
|
event::idx ref_min
|
||||||
{
|
{
|
||||||
opts.ref.first
|
opts.ref.first
|
||||||
|
|
Loading…
Reference in a new issue