Compare commits

...

2 Commits

Author SHA1 Message Date
473101a15e Switch to dark CSS. 2018-12-25 18:28:32 -08:00
d0c21cc2fa Filter some useless events to improve performance. 2018-12-25 18:01:16 -08:00
2 changed files with 14 additions and 4 deletions

View File

@ -392,11 +392,19 @@ mergeRooms r1 r2 =
} }
mergeSyncResponse : SyncResponse -> SyncResponse -> SyncResponse mergeSyncResponse : SyncResponse -> SyncResponse -> SyncResponse
mergeSyncResponse l r = mergeSyncResponse l r = filterUselessState <|
{ r | rooms = mergeMaybe mergeRooms l.rooms r.rooms { r | rooms = mergeMaybe mergeRooms l.rooms r.rooms
, accountData = mergeMaybe mergeAccountData l.accountData r.accountData , accountData = mergeMaybe mergeAccountData l.accountData r.accountData
} }
filterUselessState : SyncResponse -> SyncResponse
filterUselessState sr =
let
filterUselessRoomState _ r = { r | state = Maybe.map (\s -> { s | events = Maybe.map (List.filter (((==) "m.room.name") << .type_)) s.events }) r.state }
filterUselessRoomsState rs = { rs | join = Maybe.map (Dict.map filterUselessRoomState) rs.join }
in
{ sr | rooms = Maybe.map (filterUselessRoomsState) sr.rooms }
appendRoomHistoryResponse : JoinedRoom -> HistoryResponse -> JoinedRoom appendRoomHistoryResponse : JoinedRoom -> HistoryResponse -> JoinedRoom
appendRoomHistoryResponse jr hr = appendRoomHistoryResponse jr hr =
let let

View File

@ -2,8 +2,8 @@
$primary-color: #53C0FA; $primary-color: #53C0FA;
$primary-color-highlight: #4298C7; $primary-color-highlight: #4298C7;
$primary-color-light: #9FDBFB; $primary-color-light: #9FDBFB;
$active-input-color: white; $active-input-color: #282d30;
$background-color: #fafafa; $background-color: #1b1e21;
$background-color-dark: darken($background-color, 4%); $background-color-dark: darken($background-color, 4%);
$error-color: #f01d43; $error-color: #f01d43;
$error-color-dark: darken(#f01d43, 10%); $error-color-dark: darken(#f01d43, 10%);
@ -22,6 +22,7 @@ body {
margin: 0px; margin: 0px;
background-color: $background-color; background-color: $background-color;
font-size: 12px; font-size: 12px;
color: white;
} }
@mixin input-common { @mixin input-common {
@ -37,7 +38,7 @@ body {
input, textarea { input, textarea {
@include input-common(); @include input-common();
background-color: $inactive-input-color; background-color: $inactive-input-color;
color: black; color: white;
border: .5px solid $inactive-input-border-color; border: .5px solid $inactive-input-border-color;
&:focus { &:focus {
@ -275,6 +276,7 @@ span.sender-wrapper {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
vertical-align: bottom; /* Fix for overflow changing element height */ vertical-align: bottom; /* Fix for overflow changing element height */
color: black;
} }
/** /**