Skip to content

Commit

Permalink
Adium related fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed Jul 7, 2024
1 parent 21097d9 commit fb6e58d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ QByteArray Theme::loadData(const QString &fileName, const QString &themePath, bo
}

if (!z.readFile(fileName, &ba)) {
auto n = "/" + fileName;
if (loaded) {
*loaded = z.readFile(n, &ba);
} else {
z.readFile(n, &ba);
if (!z.readFile("/" + fileName, &ba)) {
return {};
}
}
if (loaded) {
*loaded = true;
}
}
#endif

Expand Down
3 changes: 2 additions & 1 deletion themes/chatview/adium/Template.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,11 @@

//Auto-scroll to bottom. Use nearBottom to determine if a scrollToBottom is desired.
function nearBottom() {
return ( document.body.scrollTop >= ( document.body.offsetHeight - ( window.innerHeight * 1.2 ) ) );
return ( (document.documentElement.scrollTop + document.body.scrollTop) >= ( document.body.offsetHeight - ( window.innerHeight * 1.2 ) ) );
}
function scrollToBottom() {
document.body.scrollTop = document.body.offsetHeight;
document.documentElement.scrollTop = document.body.offsetHeight;
}

//Dynamically exchange the active stylesheet
Expand Down
2 changes: 1 addition & 1 deletion themes/chatview/adium/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var adapter = {
if (value) {
baseDir = value.split("/")[0] + "/";
}
loader.setHttpResourcePath("/" + baseDir + "Contents/Resources");
loader.setHttpResourcePath(baseDir + "Contents/Resources");

//chat.console("DEBUG: loading " + loader.themeId);
var resources = ["FileTransferRequest.html",
Expand Down

0 comments on commit fb6e58d

Please sign in to comment.