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
|
||||
function Base.show(io::IO, m::MatrixMsg; muser::Union{Nothing,MatrixUser} = nothing)
|
||||
global user
|
||||
dirforward = false
|
||||
if muser === nothing
|
||||
if isdefined(MatrixChat, :user)
|
||||
direction = m.sender == user ?
|
||||
" ««« " : " »»» "
|
||||
else
|
||||
direction = " »»» "
|
||||
dirforward = m.sender == user
|
||||
end
|
||||
else
|
||||
direction = " »»» "
|
||||
dirforward = m.sender == muser
|
||||
end
|
||||
|
||||
# read = m.isread
|
||||
read = false
|
||||
direction = dirforward ? (read ? " ««« " : " <<< ") :
|
||||
(read ? " »»» " : " >>> ")
|
||||
|
||||
d = Dates.epochms2datetime(m.timestamp +
|
||||
Dates.datetime2epochms(Dates.unix2datetime(0)))
|
||||
dtfmt = if Dates.Hour(now()) - Dates.Hour(d) < Dates.Hour(24)
|
||||
|
|
Loading…
Reference in New Issue