diff --git a/app/package-lock.json b/app/package-lock.json
index c2311f5..9f3eb09 100644
--- a/app/package-lock.json
+++ b/app/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "watch-party-crx",
- "version": "1.3.0",
+ "version": "1.3.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/app/package.json b/app/package.json
index 072c08c..02aedcb 100644
--- a/app/package.json
+++ b/app/package.json
@@ -1,6 +1,6 @@
{
"name": "watch-party-crx",
- "version": "1.3.1",
+ "version": "1.3.2",
"private": true,
"dependencies": {
"@giphy/js-fetch-api": "^1.5.8",
diff --git a/app/public/manifest.json b/app/public/manifest.json
index 477b011..9c73ac0 100644
--- a/app/public/manifest.json
+++ b/app/public/manifest.json
@@ -1,7 +1,7 @@
{
"name": "Watch Party",
"short_name": "WP",
- "version": "1.3.1",
+ "version": "1.3.2",
"description": "Watch streamed content together.",
"background": {
"page": "popup.html"
diff --git a/app/src/App.js b/app/src/App.js
index 4fc0f84..bf0d0ae 100644
--- a/app/src/App.js
+++ b/app/src/App.js
@@ -8,6 +8,8 @@ import 'firebase/firestore';
import Inactive from './Inactive';
import { getUserUid } from './Api';
+const APP_VERSION = '1.3.2';
+
const darkTheme = createMuiTheme({
palette: {
type: 'dark',
@@ -26,6 +28,10 @@ const Routes = (props) => (
);
+const wrongVersionStatus = {
+ message: `Looks like Watch Party needs to update.\nGo to chrome://extensions to manually update.`,
+};
+
const App = () => {
const closedNotification = { open: false, message: '' };
@@ -76,13 +82,13 @@ const App = () => {
{loading && }
- {status.active ? (
+ {status.active2 && status.version === APP_VERSION ? (
setNotification({ open: true, message })}
/>
) : (
-
+
)}
setVisible(!visible)} className="watch-party-fab">
diff --git a/app/src/Chat.js b/app/src/Chat.js
index 34fee48..f9e7b33 100644
--- a/app/src/Chat.js
+++ b/app/src/Chat.js
@@ -111,8 +111,7 @@ export default class Chat extends Component {
return;
}
this.setState(response);
- if (response.player && this.state.player !== response.player)
- this.mVideoListener.doUpdate(response.player);
+ if (response.player) this.mVideoListener.doUpdate(response.player);
const pcc = document.querySelector('.thread-container');
if (pcc) pcc.scrollTop = pcc.scrollHeight;
});
diff --git a/app/src/index.css b/app/src/index.css
index 67bba7d..d11dbe2 100644
--- a/app/src/index.css
+++ b/app/src/index.css
@@ -90,20 +90,6 @@ body.amazon-prime textarea:focus {
box-shadow: none !important;
}
-@keyframes backgroundpulse {
- 0% {
- background-color: black;
- color: red;
- }
- 50% {
- background-color: red;
- color: black;
- }
- 100% {
- background-color: black;
- color: red;
- }
-}
#party-loading {
position: absolute;
width: 100%;
@@ -119,10 +105,16 @@ body.amazon-prime textarea:focus {
#party-loading.inactive {
flex-direction: column;
text-align: center;
- animation-duration: 4s;
- animation-timing-function: linear;
- animation-iteration-count: infinite;
- animation-name: backgroundpulse;
+ padding: 2rem;
+ width: calc(100% - 4rem);
+ height: calc(100% - 4rem);
+ white-space: break-spaces;
+}
+#party-loading.inactive .MuiTypography-overline {
+ font-size: 1.1rem !important;
+}
+#party-loading.inactive .MuiTypography-caption {
+ font-size: 1rem !important;
}
#party-routes-wrapper {
margin: 0;
diff --git a/firebase.json b/firebase.json
index 1494a46..b5a7300 100644
--- a/firebase.json
+++ b/firebase.json
@@ -25,6 +25,9 @@
},
"ui": {
"enabled": true
+ },
+ "pubsub": {
+ "port": 8085
}
},
"firestore": {
diff --git a/functions/index.js b/functions/index.js
index c0bf5a5..33f7cfc 100644
--- a/functions/index.js
+++ b/functions/index.js
@@ -1,4 +1,4 @@
-const FunctionModules = require('./modules2/index');
+const FunctionModules2 = require('./modules2/index');
const functions = require('firebase-functions');
const secret = require('./FirebaseSecret.json');
const admin = require('firebase-admin');
@@ -18,4 +18,4 @@ exports.widgets2 = functions.https.onRequest(REST.v2);
exports.scheduledCleanUp = functions.pubsub
.schedule('every 60 minutes')
- .onRun(FunctionModules.scheduledCleanUp);
+ .onRun(FunctionModules2.scheduledCleanUp);
diff --git a/functions/modules2/scheduledCleanUp.js b/functions/modules2/scheduledCleanUp.js
index 8fcb181..6d86287 100644
--- a/functions/modules2/scheduledCleanUp.js
+++ b/functions/modules2/scheduledCleanUp.js
@@ -1,5 +1,12 @@
const admin = require('firebase-admin');
-const FunctionModules = require('./index');
+
+const timeDiff = (ds1, ds2) => {
+ const d1 = new Date(ds1);
+ const d2 = new Date(ds2);
+ var diff = (d2.getTime() - d1.getTime()) / 1000;
+ diff /= 60 * 60;
+ return Math.abs(Math.round(diff));
+};
module.exports = async () => {
const startedTime = new Date();
@@ -19,10 +26,10 @@ module.exports = async () => {
.get()
.then(async (roomSnap) => {
if (
- FunctionModules.timeDiff(roomSnap.createTime.toDate(), startedTime) >= 24 ||
- FunctionModules.timeDiff(roomSnap.updateTime.toDate(), startedTime) >= 12
+ timeDiff(roomSnap.createTime.toDate(), startedTime) >= 24 ||
+ timeDiff(roomSnap.updateTime.toDate(), startedTime) >= 12
)
- await FunctionModules.cleanUpRoom(roomSnap.id);
+ await FunctionModules2.cleanUpRoom(roomSnap.id);
console.info(`Deleted room ${roomSnap.id} from auto cleanup`);
return;
})
diff --git a/functions/modules2/timeDiff.js b/functions/modules2/timeDiff.js
index 5acc187..7c16ead 100644
--- a/functions/modules2/timeDiff.js
+++ b/functions/modules2/timeDiff.js
@@ -1,4 +1,4 @@
-module.exports = (ds1, ds2) => {
+module.exports = function (ds1, ds2) {
const d1 = new Date(ds1);
const d2 = new Date(ds2);
var diff = (d2.getTime() - d1.getTime()) / 1000;
diff --git a/functions/package.json b/functions/package.json
index 88930cf..00e9559 100644
--- a/functions/package.json
+++ b/functions/package.json
@@ -1,6 +1,6 @@
{
"name": "watch-party-api",
- "version": "1.3.1",
+ "version": "1.3.2",
"description": "Cloud Functions for Watch Party",
"scripts": {
"lint": "eslint .",
diff --git a/package.json b/package.json
index ae69c9e..627afc4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "watch-party",
- "version": "1.3.1",
+ "version": "1.3.2",
"description": "Watch Party",
"scripts": {
"start": "firebase emulators:start",