Initially done with PR

This commit is contained in:
apa420 2018-08-26 13:49:15 +02:00
parent 8ea3b6c8ee
commit 15bcb5a2fb
4 changed files with 3 additions and 20 deletions

View file

@ -20,7 +20,6 @@ void DownloadManager::setFile(QString fileURL, const QString &channelName)
QString filePath = fileURL; QString filePath = fileURL;
QString saveFilePath; QString saveFilePath;
QStringList filePathList = filePath.split('/'); QStringList filePathList = filePath.split('/');
// QString fileName = filePathList.at(filePathList.count() - 1);
saveFilePath = QString( saveFilePath = QString(
QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) +
"2/cache/profileAvatars/twitch/" + channelName + ".png"); "2/cache/profileAvatars/twitch/" + channelName + ".png");

View file

@ -15,7 +15,7 @@ class DownloadManager : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit DownloadManager(QObject *parent = 0); explicit DownloadManager(QObject *parent = nullptr);
virtual ~DownloadManager(); virtual ~DownloadManager();
void setFile(QString fileURL, const QString &channelName); void setFile(QString fileURL, const QString &channelName);

View file

@ -115,12 +115,8 @@ void Toasts::sendWindowsNotification(const QString &channelName, Platform p)
WinToastLib::WinToastTemplate::SecondLine); WinToastLib::WinToastTemplate::SecondLine);
QString Path; QString Path;
if (p == Platform::Twitch) { if (p == Platform::Twitch) {
Path = Path = getApp()->paths->cacheDirectory() + "/" +
QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "profileAvatars/twitch/" + channelName + ".png";
"2/cache/profileAvatars/twitch/" + channelName + ".png";
// Change it to this below v
// Path = getApp()->paths->cacheDirectory() + "profileAvatars/twitch/" +
// channelName + ".png";
} }
std::string temp_Utf8 = Path.toUtf8().constData(); std::string temp_Utf8 = Path.toUtf8().constData();
std::wstring imagePath = std::wstring(temp_Utf8.begin(), temp_Utf8.end()); std::wstring imagePath = std::wstring(temp_Utf8.begin(), temp_Utf8.end());

View file

@ -559,18 +559,6 @@ void ChannelView::setChannel(ChannelPtr newChannel)
if (tc != nullptr) { if (tc != nullptr) {
tc->tabHighlightRequested.connect([this](HighlightState state) { tc->tabHighlightRequested.connect([this](HighlightState state) {
this->tabHighlightRequested.invoke(HighlightState::Notification); this->tabHighlightRequested.invoke(HighlightState::Notification);
/*
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing, true);
painter.translate(2, 2);
painter.setPen(QColor("#6441A4"));
painter.drawEllipse(QRectF(10, 10, 5, 5));
*/
QPainter painter(this);
auto radius = 10;
painter.setPen(QColor("#6441A4"));
painter.drawEllipse(this->rect().center(), radius, radius);
}); });
} }
} }