about summary refs log tree commit diff
path: root/app/javascript/mastodon/reducers
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2021-07-07 11:46:33 -0500
committerStarfall <us@starfall.systems>2021-07-07 11:46:33 -0500
commitd30025d28d813999bfe98ce9cee2cda3bebf6c22 (patch)
treee2cf70344fc6426f3a2c778d3b6d3bab9e22c078 /app/javascript/mastodon/reducers
parentfadb06ef6e1950a82f08673683e705943b93ba40 (diff)
parent0c2eb949fc21ceecbd99a81e5ffe75517a1e64df (diff)
Merge branch 'glitch'
Diffstat (limited to 'app/javascript/mastodon/reducers')
-rw-r--r--app/javascript/mastodon/reducers/picture_in_picture.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/javascript/mastodon/reducers/picture_in_picture.js b/app/javascript/mastodon/reducers/picture_in_picture.js
index 06cd8c5e8..48772ae7f 100644
--- a/app/javascript/mastodon/reducers/picture_in_picture.js
+++ b/app/javascript/mastodon/reducers/picture_in_picture.js
@@ -1,4 +1,5 @@
 import { PICTURE_IN_PICTURE_DEPLOY, PICTURE_IN_PICTURE_REMOVE } from 'mastodon/actions/picture_in_picture';
+import { TIMELINE_DELETE } from '../actions/timelines';
 
 const initialState = {
   statusId: null,
@@ -16,6 +17,8 @@ export default function pictureInPicture(state = initialState, action) {
     return { statusId: action.statusId, accountId: action.accountId, type: action.playerType, ...action.props };
   case PICTURE_IN_PICTURE_REMOVE:
     return { ...initialState };
+  case TIMELINE_DELETE:
+    return (state.statusId === action.id) ? { ...initialState } : state;
   default:
     return state;
   }