mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-24 18:25:41 +03:00
Make sure status link has instance too for toast
This commit is contained in:
parent
732244b4b3
commit
4b88c6ca65
2 changed files with 9 additions and 3 deletions
|
@ -318,7 +318,7 @@ function App() {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
onClose={(results) => {
|
onClose={(results) => {
|
||||||
const { newStatus } = results || {};
|
const { newStatus, instance } = results || {};
|
||||||
states.showCompose = false;
|
states.showCompose = false;
|
||||||
window.__COMPOSE__ = null;
|
window.__COMPOSE__ = null;
|
||||||
if (newStatus) {
|
if (newStatus) {
|
||||||
|
@ -334,7 +334,11 @@ function App() {
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
toast.hideToast();
|
toast.hideToast();
|
||||||
states.prevLocation = location;
|
states.prevLocation = location;
|
||||||
navigate(`/s/${newStatus.id}`);
|
navigate(
|
||||||
|
instance
|
||||||
|
? `/${instance}/s/${newStatus.id}`
|
||||||
|
: `/s/${newStatus.id}`,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
toast.showToast();
|
toast.showToast();
|
||||||
|
|
|
@ -113,7 +113,8 @@ function Compose({
|
||||||
const currentAccount = getCurrentAccount();
|
const currentAccount = getCurrentAccount();
|
||||||
const currentAccountInfo = currentAccount.info;
|
const currentAccountInfo = currentAccount.info;
|
||||||
|
|
||||||
const { configuration } = getCurrentInstance();
|
const instance = getCurrentInstance();
|
||||||
|
const { configuration } = instance;
|
||||||
console.log('⚙️ Configuration', configuration);
|
console.log('⚙️ Configuration', configuration);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
@ -785,6 +786,7 @@ function Compose({
|
||||||
// Close
|
// Close
|
||||||
onClose({
|
onClose({
|
||||||
newStatus,
|
newStatus,
|
||||||
|
instance,
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
Loading…
Reference in a new issue