mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
Disable relative message number in subscription ranges.
This commit is contained in:
parent
0e7ea64709
commit
38fce5986e
@ -1210,7 +1210,7 @@
|
||||
?=(^ tal.u.ran.src)
|
||||
::
|
||||
?- -.u.tal.u.ran.src
|
||||
$sd &
|
||||
:: $sd &
|
||||
$da (gte now.bol +.u.tal.u.ran.src)
|
||||
$ud ?& ?=(^ seq)
|
||||
(gte u.seq +.u.tal.u.ran.src)
|
||||
@ -1233,12 +1233,12 @@
|
||||
=. ran
|
||||
?~ ran `[[%ud 0] `[%ud count]]
|
||||
=* hed hed.u.ran
|
||||
=? hed ?=($sd -.hed)
|
||||
[%ud (sub count (min count (abs:si +.hed)))]
|
||||
:: =? hed ?=($sd -.hed)
|
||||
:: [%ud (sub count (min count (abs:si +.hed)))]
|
||||
?~ tal.u.ran `[hed `[%ud count]]
|
||||
=* tal u.tal.u.ran
|
||||
=? tal ?=($sd -.tal)
|
||||
[%ud (sub count (min count (abs:si +.tal)))]
|
||||
:: =? tal ?=($sd -.tal)
|
||||
:: [%ud (sub count (min count (abs:si +.tal)))]
|
||||
ran
|
||||
:: never fails, but compiler needs it.
|
||||
?> &(?=(^ ran) ?=(^ tal.u.ran))
|
||||
@ -1248,14 +1248,14 @@
|
||||
|- ^- (list telegram)
|
||||
?~ gaz zeg
|
||||
?: ?- -.tal :: after the end
|
||||
$sd !! :: caught above
|
||||
:: $sd !! :: caught above
|
||||
$ud (lth +.tal num)
|
||||
$da (lth +.tal wen.i.gaz)
|
||||
==
|
||||
:: if past the range, we're done searching.
|
||||
zeg
|
||||
?: ?- -.hed :: before the start
|
||||
$sd !! :: caught above
|
||||
:: $sd !! :: caught above
|
||||
$ud (lth num +.hed)
|
||||
$da (lth wen.i.gaz +.hed)
|
||||
==
|
||||
@ -1279,7 +1279,7 @@
|
||||
=/ min
|
||||
=* hed hed.u.ran
|
||||
?- -.hed
|
||||
$sd & :: relative is always in.
|
||||
:: $sd & :: relative is always in.
|
||||
$ud (gth count +.hed)
|
||||
$da (gth now.bol +.hed)
|
||||
==
|
||||
@ -1288,7 +1288,7 @@
|
||||
=- [&(min -) !-]
|
||||
=* tal u.tal.u.ran
|
||||
?- -.tal
|
||||
$sd | :: relative is always done.
|
||||
:: $sd | :: relative is always done.
|
||||
$ud (gte +(+.tal) count)
|
||||
$da (gte +.tal now.bol)
|
||||
==
|
||||
|
@ -229,8 +229,10 @@
|
||||
%+ welp /circle/[inbox]/grams/config/group
|
||||
?. =(0 count)
|
||||
[(scot %ud last) ~]
|
||||
=+ history-msgs=200
|
||||
[(cat 3 '-' (scot %ud history-msgs)) ~]
|
||||
:: =+ history-msgs=200
|
||||
:: [(cat 3 '-' (scot %ud history-msgs)) ~]
|
||||
=+ history-days=~d5
|
||||
[(scot %da (sub now.bol history-days)) ~]
|
||||
==
|
||||
::
|
||||
:> #
|
||||
|
@ -78,8 +78,9 @@
|
||||
::
|
||||
|= pla/place
|
||||
^- knot
|
||||
?. ?=($sd -.pla) (scot -.pla +.pla)
|
||||
(cat 3 '-' (scot %ud (abs:si +.pla)))
|
||||
:: ?. ?=($sd -.pla)
|
||||
(scot -.pla +.pla)
|
||||
:: (cat 3 '-' (scot %ud (abs:si +.pla)))
|
||||
::
|
||||
++ path-to-range
|
||||
:> path to msg range
|
||||
@ -107,9 +108,9 @@
|
||||
^- (unit @da)
|
||||
?:(?=($da p.a) `q.a ~)
|
||||
::
|
||||
%+ stag %sd
|
||||
%+ cook (cury new:si |)
|
||||
;~(pfix hep dem:ag)
|
||||
:: %+ stag %sd
|
||||
:: %+ cook (cury new:si |)
|
||||
:: ;~(pfix hep dem:ag)
|
||||
==
|
||||
::
|
||||
++ change-glyphs :< ...
|
||||
|
@ -55,7 +55,7 @@
|
||||
++ place :> range indicators
|
||||
$% {$da @da} :< date
|
||||
{$ud @ud} :< message number
|
||||
{$sd @sd} :< previous messages
|
||||
:: {$sd @sd} :< previous messages
|
||||
== ::
|
||||
++ prize :> query result
|
||||
$% {$client prize-client} :< /client
|
||||
|
Loading…
Reference in New Issue
Block a user