Skip to content

Commit

Permalink
Merge pull request #748 from KhalisFoundation/master
Browse files Browse the repository at this point in the history
5.3.3 Release
  • Loading branch information
tsingh777 authored Aug 23, 2019
2 parents 7bdb65f + d44cbe2 commit f16a7ae
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## New Updates

### 5.3.3 - _190822_
### Improved:

- Fixed a bug when using BaniOverlay with longer Banis/Shabads

### 5.3.2 - _190806_
### Improved:
Expand Down
4 changes: 3 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ function createBroadcastFiles(arg) {
const showLine = (line, socket = io) => {
const overlayPrefs = store.get('obs');
const payload = Object.assign(line, overlayPrefs);
socket.emit('show-line', payload);
if (!line.fromScroll) {
socket.emit('show-line', payload);
}
};

const updateOverlayVars = () => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"productName": "SikhiToTheMax",
"name": "sttm-desktop",
"version": "5.3.2",
"version": "5.3.3",
"description": "The SikhiToTheMax desktop app",
"main": "app.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion www/js/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ module.exports = {
return Line;
},

sendLine(shabadID, lineID, rawLine, rawRows, mode, start) {
sendLine(shabadID, lineID, rawLine, rawRows, mode, start, fromScroll) {
const Line = this.remapLine(rawLine);
const rows = rawRows.map(row => this.remapLine(row));
global.webview.send('show-line', { shabadID, lineID, rows, mode });
Expand All @@ -550,6 +550,7 @@ module.exports = {
larivaar: store.get('userPrefs.slide-layout.display-options.larivaar'),
rows,
mode,
fromScroll,
};
if (document.body.classList.contains('livefeed')) {
showLinePayload.live = true;
Expand Down
15 changes: 6 additions & 9 deletions www/js/search.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable arrow-parens */
// HTMLElement builder
const h = require('hyperscript');
const { remote } = require('electron');
Expand Down Expand Up @@ -383,8 +382,7 @@ module.exports = {
this.$dbDownloadProgress.style.width = `${state.percent * 100}%`;
},

// eslint-disable-next-line no-unused-vars
focusSearch(e) {
focusSearch() {
// open the Gurmukhi keyboard if it was previously open
if (store.get('gurmukhiKB')) {
this.openGurmukhiKB();
Expand Down Expand Up @@ -463,8 +461,7 @@ module.exports = {
store.set('searchOptions.searchLanguage', value);
},

// eslint-disable-next-line no-unused-vars
toggleGurmukhiKB(e) {
toggleGurmukhiKB() {
const gurmukhiKBPref = store.get('gurmukhiKB');
// no need to set a preference if user is just re-opening after KB was auto-closed
if (!this.$navigator.classList.contains('kb-active') && gurmukhiKBPref) {
Expand Down Expand Up @@ -850,7 +847,7 @@ module.exports = {
return shabadLine;
},

printShabad(rows, ShabadID, LineID, start = 0) {
printShabad(rows, ShabadID, LineID, start = 0, fromScroll = false) {
const shabadState = sessionStatesList[rows[0].sessionKey || `shabad-${ShabadID}`];
let lineID = LineID || rows[0].ID;
const shabadID =
Expand Down Expand Up @@ -893,12 +890,12 @@ module.exports = {
// if scrolled too far, too fast, then load all the verses to fill the area scrolled.
if (tooFar) {
while (tooFar) {
this.printShabad(rows, ShabadID, lineID, newStart);
this.printShabad(rows, ShabadID, lineID, newStart, true);
newStart += throughput;
tooFar = e.target.scrollTop > (newStart + throughput) * lineHeight;
}
} else if (e.target.scrollTop >= maxScrollSize) {
this.printShabad(rows, ShabadID, lineID, end);
this.printShabad(rows, ShabadID, lineID, end, true);
}
};

Expand Down Expand Up @@ -964,7 +961,7 @@ module.exports = {
this.$shabadContainer.scrollTop = curPankteeTop;
}
// send the line to app.js, which will send it to the viewer window as well as obs file
global.controller.sendLine(shabadID, lineID, mainLine, currentRows, mode, start);
global.controller.sendLine(shabadID, lineID, mainLine, currentRows, mode, start, fromScroll);

// Hide next and previous links before loading first and last shabad
const $shabadNext = document.querySelector('#shabad-next');
Expand Down

0 comments on commit f16a7ae

Please sign in to comment.