mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-03 04:40:50 +03:00
chat: style fixes, removed some redirect bugs from chat
This commit is contained in:
parent
79903ff9f5
commit
fbbb3830b2
@ -125,7 +125,7 @@
|
||||
[bone %quit ~]
|
||||
==
|
||||
?. |(=(u.ship src.bol) (team:title our.bol src.bol))
|
||||
:: if neither ship = source or source = us, do nothing
|
||||
:: if neither ship = source or source = us, do nothing
|
||||
[~ this]
|
||||
:: delete a foreign ship's path
|
||||
:- (pull-wire [%mailbox path.act])
|
||||
@ -201,7 +201,6 @@
|
||||
?. (~(has by synced) path.diff)
|
||||
[~ this]
|
||||
:_ this(synced (~(del by synced) path.diff))
|
||||
:- (chat-poke diff)
|
||||
[ost.bol %pull [%mailbox path.diff] [our.bol %chat-store] ~]~
|
||||
::
|
||||
%message
|
||||
|
File diff suppressed because one or more lines are too long
@ -126,8 +126,6 @@
|
||||
%+ frond %chat-update
|
||||
%- pairs
|
||||
:~
|
||||
::
|
||||
:: %message
|
||||
?: =(%message -.upd)
|
||||
?> ?=(%message -.upd)
|
||||
:- %message
|
||||
@ -135,13 +133,9 @@
|
||||
:~ [%path (path path.upd)]
|
||||
[%envelope (enve envelope.upd)]
|
||||
==
|
||||
::
|
||||
:: %read
|
||||
?: =(%read -.upd)
|
||||
?> ?=(%read -.upd)
|
||||
[%read (pairs [%path (path path.upd)]~)]
|
||||
::
|
||||
:: %create
|
||||
?: =(%create -.upd)
|
||||
?> ?=(%create -.upd)
|
||||
:- %create
|
||||
@ -149,13 +143,9 @@
|
||||
:~ [%ship (ship ship.upd)]
|
||||
[%path (path path.upd)]
|
||||
==
|
||||
::
|
||||
:: %delete
|
||||
?: =(%delete -.upd)
|
||||
?> ?=(%delete -.upd)
|
||||
[%delete (pairs [%path (path path.upd)]~)]
|
||||
::
|
||||
:: %config
|
||||
?: =(%config -.upd)
|
||||
?> ?=(%config -.upd)
|
||||
:- %config
|
||||
@ -163,8 +153,6 @@
|
||||
:~ [%path (path path.upd)]
|
||||
[%config (conf config.upd)]
|
||||
==
|
||||
::
|
||||
:: %noop
|
||||
[*@t *^json]
|
||||
==
|
||||
::
|
||||
|
@ -1,5 +1,5 @@
|
||||
|%
|
||||
++ serial @uvH
|
||||
+$ serial @uvH
|
||||
::
|
||||
+$ letter
|
||||
$% [%text text=cord]
|
||||
@ -42,5 +42,4 @@
|
||||
[%config =path =config]
|
||||
chat-action
|
||||
==
|
||||
::
|
||||
--
|
||||
|
@ -58,7 +58,7 @@ export class ChatScreen extends Component {
|
||||
);
|
||||
this.updateReadNumber();
|
||||
});
|
||||
} else if (Object.keys(props.inbox) > 0) {
|
||||
} else if (Object.keys(props.inbox).length === 0) {
|
||||
props.history.push('/~chat');
|
||||
} else if (props.envelopes.length - prevProps.envelopes.length >= 200) {
|
||||
this.hasAskedForMessages = false;
|
||||
|
@ -10,7 +10,7 @@ export class JoinScreen extends Component {
|
||||
|
||||
componentDidMount() {
|
||||
const { props } = this;
|
||||
let station = `${props.match.params.ship}/${props.match.params.station}`;
|
||||
let station = `/${props.match.params.ship}/${props.match.params.station}`;
|
||||
|
||||
if (station in props.inbox) {
|
||||
props.history.push(`/~chat/room${station}`);
|
||||
|
@ -23,12 +23,9 @@ export class InviteElement extends Component {
|
||||
let aud = [];
|
||||
let isValid = true;
|
||||
if (state.members.length > 2) {
|
||||
aud = state.members.split(',')
|
||||
.map((mem) => mem.trim())
|
||||
.map(deSig)
|
||||
.map((mem) => {
|
||||
return `~${mem}`;
|
||||
});
|
||||
aud = state.members
|
||||
.split(',')
|
||||
.map((mem) => `~${deSig(mem.trim())}`);
|
||||
|
||||
aud.forEach((mem) => {
|
||||
if (!urbitOb.isValidPatp(mem)) {
|
||||
|
@ -73,11 +73,7 @@ export class NewScreen extends Component {
|
||||
let isValid = true;
|
||||
if (state.invites.length > 2) {
|
||||
aud = state.invites.split(',')
|
||||
.map((mem) => mem.trim())
|
||||
.map(deSig)
|
||||
.map((mem) => {
|
||||
return `~${mem}`;
|
||||
});
|
||||
.map((mem) => `~${deSig(mem.trim())}`);
|
||||
|
||||
aud.forEach((mem) => {
|
||||
if (!urbitOb.isValidPatp(mem)) {
|
||||
|
Loading…
Reference in New Issue
Block a user