mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
added autocompletion for commands
This commit is contained in:
parent
2b99a3574c
commit
f5a05543cd
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "application.hpp"
|
||||
#include "common.hpp"
|
||||
#include "controllers/commands/commandcontroller.hpp"
|
||||
#include "debug/log.hpp"
|
||||
#include "singletons/emotemanager.hpp"
|
||||
|
||||
|
@ -63,6 +64,11 @@ void CompletionModel::refresh()
|
|||
this->addString(":" + m + ":", TaggedString::Type::Emoji);
|
||||
}
|
||||
|
||||
// Commands
|
||||
for (auto &command : app->commands->items.getVector()) {
|
||||
this->addString(command.name, TaggedString::Command);
|
||||
}
|
||||
|
||||
// Channel-specific: Usernames
|
||||
// fourtf: only works with twitch chat
|
||||
// auto c = singletons::ChannelManager::getInstance().getTwitchChannel(this->channelName);
|
||||
|
|
|
@ -24,6 +24,7 @@ class CompletionModel : public QAbstractListModel
|
|||
TwitchGlobalEmote,
|
||||
TwitchSubscriberEmote,
|
||||
Emoji,
|
||||
Command,
|
||||
};
|
||||
|
||||
TaggedString(const QString &_str, Type _type)
|
||||
|
|
Loading…
Reference in a new issue