Skip to content

Commit

Permalink
fixed messed up sort from previous release + image hack
Browse files Browse the repository at this point in the history
  • Loading branch information
b100dian committed Dec 8, 2020
1 parent a10e18b commit f817571
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
6 changes: 3 additions & 3 deletions qml/pages/ChannelList.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function compareChannels(a, b) {
return Channel.compareByName(a, b)
}

var categories = ["starred", "channels", "chat"];
var categories = ["starred", "channel", "chat"];
function compareByCategory(a, b) {
if (a.category !== b.category) {
var diff = categories.indexOf(a.category) - categories.indexOf(b.category);
Expand All @@ -81,9 +81,9 @@ function compareByCategory(a, b) {

function compareByBool(a, b, prop, desired) {
if (a[prop] !== b[prop]) {
if (b[prop] === desired) {
if (Boolean(b[prop]) === desired) {
return 1;
} else {
} else if (Boolean(a[prop]) === desired){
return -1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion rpm/harbour-sailslack.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Name: harbour-sailslack
%{!?qtc_make:%define qtc_make make}
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: Unoffical Slack client for Sailfish
Version: 1.4.6
Version: 1.4.7
Release: 1
Group: Qt/Qt
License: LICENSE
Expand Down
12 changes: 1 addition & 11 deletions src/networkaccessmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,5 @@ QNetworkReply* NetworkAccessManager::createRequest(Operation op, const QNetworkR
}

QString NetworkAccessManager::getToken(QUrl url) {
QRegularExpression re("^.*/([A-Z0-9]+)-.*$");
QRegularExpressionMatch match = re.match(url.path());
if (match.hasMatch()) {
const QString team = match.captured(1);
SlackClientConfig config(team);
const QString token = config.getAccessToken();
if (!token.isEmpty()){
return config.getAccessToken();
}
}
return SlackClientConfig::lastToken();
}
g}
1 change: 1 addition & 0 deletions src/slackclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,7 @@ QVariantMap SlackClient::parseGroup(QJsonObject group) {
data.insert("type", QVariant("group"));
data.insert("category", QVariant("channel"));
data.insert("name", group.value("name").toVariant());
data.insert("is_starred", group.value("is_starred").toBool());
updateChannelUnreadCount(id, lastRead);
}

Expand Down

0 comments on commit f817571

Please sign in to comment.