mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 06:35:32 +03:00
groups: cleanup merge errors
This commit is contained in:
parent
93cf40a604
commit
8d308b2458
@ -67,9 +67,9 @@
|
||||
=. cards
|
||||
:_ cards
|
||||
[%pass /trim %agent [our.bowl %chat-store] %poke %noun !>([%trim ~])]
|
||||
$(old [%4 inbox.old])
|
||||
$(old [%3 inbox.old])
|
||||
::
|
||||
?(%0 %1) $(old [%2 (old-to-2 inbox.old)])
|
||||
?(%0 %1) $(old (old-to-2 inbox.old))
|
||||
::
|
||||
==
|
||||
::
|
||||
|
@ -162,11 +162,11 @@
|
||||
?. ?=(%& -.val)
|
||||
(on-poke:def mark vase)
|
||||
=/ group=path +.p.val
|
||||
=/ res=(set resource) (~(get ju group-indices) group)
|
||||
=/ res=(set md-resource) (~(get ju group-indices) group)
|
||||
=. group-indices (~(del by group-indices) group)
|
||||
:- ~
|
||||
%+ roll ~(tap in res)
|
||||
|= [r=resource out=_state]
|
||||
|= [r=md-resource out=_state]
|
||||
=. resource-indices.out (~(del by resource-indices.out) r)
|
||||
=. app-indices.out
|
||||
%- ~(del ju app-indices.out)
|
||||
|
@ -4,7 +4,7 @@ import { Link } from 'react-router-dom';
|
||||
import { InviteSearch, Invites } from '../../../components/InviteSearch';
|
||||
import { Spinner } from '../../../components/Spinner';
|
||||
import { RouteComponentProps } from 'react-router-dom';
|
||||
import { Groups, GroupPolicy } from '../../../types/group-update';
|
||||
import { Groups, GroupPolicy, Resource } from '../../../types/group-update';
|
||||
import { Contacts, Rolodex } from '../../../types/contact-update';
|
||||
import GlobalApi from '../../../api/global';
|
||||
import { Patp, PatpNoSig, Enc } from '../../../types/noun';
|
||||
@ -102,6 +102,7 @@ export class NewScreen extends Component<NewScreenProps, NewScreenState> {
|
||||
};
|
||||
|
||||
const { groupName } = this.state;
|
||||
const resource: Resource = { ship: `~${window.ship}`, name: groupName };
|
||||
this.setState(
|
||||
{
|
||||
invites: { ships: [], groups: [] },
|
||||
@ -110,6 +111,7 @@ export class NewScreen extends Component<NewScreenProps, NewScreenState> {
|
||||
() => {
|
||||
props.api.contacts
|
||||
.create(groupName, policy, this.state.title, this.state.description)
|
||||
.then(() => props.api.groups.add(resource, [`~${window.ship}`]))
|
||||
.then(() => {
|
||||
this.setState({ awaiting: false });
|
||||
props.history.push(
|
||||
|
@ -146,8 +146,8 @@ interface GroupUpdateRemoveGroup {
|
||||
};
|
||||
}
|
||||
|
||||
interface GroupUpdateGroupify {
|
||||
groupify: {
|
||||
interface GroupUpdateExpose {
|
||||
expose: {
|
||||
resource: Resource;
|
||||
};
|
||||
}
|
||||
@ -168,7 +168,7 @@ export type GroupUpdate =
|
||||
| GroupUpdateRemoveTag
|
||||
| GroupUpdateChangePolicy
|
||||
| GroupUpdateRemoveGroup
|
||||
| GroupUpdateGroupify
|
||||
| GroupUpdateExpose
|
||||
| GroupUpdateInitialGroup;
|
||||
|
||||
export type GroupAction = Omit<GroupUpdate, 'initialGroup' | 'initial'>;
|
||||
|
Loading…
Reference in New Issue
Block a user