prepare for msg read arrow change
parent
c198959fd7
commit
2bee38d4af
13
src/types.jl
13
src/types.jl
|
@ -50,17 +50,20 @@ end
|
||||||
using Dates
|
using Dates
|
||||||
function Base.show(io::IO, m::MatrixMsg; muser::Union{Nothing,MatrixUser} = nothing)
|
function Base.show(io::IO, m::MatrixMsg; muser::Union{Nothing,MatrixUser} = nothing)
|
||||||
global user
|
global user
|
||||||
|
dirforward = false
|
||||||
if muser === nothing
|
if muser === nothing
|
||||||
if isdefined(MatrixChat, :user)
|
if isdefined(MatrixChat, :user)
|
||||||
direction = m.sender == user ?
|
dirforward = m.sender == user
|
||||||
" ««« " : " »»» "
|
|
||||||
else
|
|
||||||
direction = " »»» "
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
direction = " »»» "
|
dirforward = m.sender == muser
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# read = m.isread
|
||||||
|
read = false
|
||||||
|
direction = dirforward ? (read ? " ««« " : " <<< ") :
|
||||||
|
(read ? " »»» " : " >>> ")
|
||||||
|
|
||||||
d = Dates.epochms2datetime(m.timestamp +
|
d = Dates.epochms2datetime(m.timestamp +
|
||||||
Dates.datetime2epochms(Dates.unix2datetime(0)))
|
Dates.datetime2epochms(Dates.unix2datetime(0)))
|
||||||
dtfmt = if Dates.Hour(now()) - Dates.Hour(d) < Dates.Hour(24)
|
dtfmt = if Dates.Hour(now()) - Dates.Hour(d) < Dates.Hour(24)
|
||||||
|
|
Loading…
Reference in New Issue