Tabbing (#287)
* change dotted last read message indicator to a line, remove airbrushgrenade * sort emotes in tab completion * implement tabbing usernames * FeelsOkayMan * fix emotes and usernames comparing; formatting * remove private/personal stuff * change lastmessageindicator back to default verpattern
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "widgets/notebook.hpp"
|
||||
#include "widgets/split.hpp"
|
||||
#include "widgets/splitcontainer.hpp"
|
||||
#include "util/urlfetch.hpp"
|
||||
|
||||
#include <QCompleter>
|
||||
#include <QPainter>
|
||||
@@ -24,6 +25,20 @@ SplitInput::SplitInput(Split *_chatWidget)
|
||||
// auto completion
|
||||
auto completer = new QCompleter(
|
||||
singletons::CompletionManager::getInstance().createModel(this->chatWidget->channelName));
|
||||
auto cc = singletons::CompletionManager::getInstance().createModel(this->chatWidget->channelName);
|
||||
cc->refresh();
|
||||
|
||||
|
||||
static QStringList jsonLabels = {"moderators", "staff", "admins", "global_mods", "viewers"};
|
||||
util::twitch::get("https://tmi.twitch.tv/group/user/" + this->chatWidget->channelName + "/chatters", this,
|
||||
[cc](QJsonObject obj) {
|
||||
QJsonObject chattersObj = obj.value("chatters").toObject();
|
||||
for (int i = 0; i < jsonLabels.size(); i++) {
|
||||
foreach (const QJsonValue &v,
|
||||
chattersObj.value(jsonLabels.at(i)).toArray())
|
||||
cc->addUser(v.toString());
|
||||
}
|
||||
});
|
||||
|
||||
this->ui.textEdit->setCompleter(completer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user