summaryrefslogtreecommitdiff
path: root/Applications/ChanViewer/ThreadCatalogModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Applications/ChanViewer/ThreadCatalogModel.cpp')
-rw-r--r--Applications/ChanViewer/ThreadCatalogModel.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Applications/ChanViewer/ThreadCatalogModel.cpp b/Applications/ChanViewer/ThreadCatalogModel.cpp
index 264ac20760..828e314410 100644
--- a/Applications/ChanViewer/ThreadCatalogModel.cpp
+++ b/Applications/ChanViewer/ThreadCatalogModel.cpp
@@ -16,11 +16,19 @@ ThreadCatalogModel::~ThreadCatalogModel()
{
}
+void ThreadCatalogModel::set_board(const String& board)
+{
+ if (m_board == board)
+ return;
+ m_board = board;
+ update();
+}
+
void ThreadCatalogModel::update()
{
CHttpRequest request;
request.set_hostname("a.4cdn.org");
- request.set_path("/g/catalog.json");
+ request.set_path(String::format("/%s/catalog.json", m_board.characters()));
auto* job = request.schedule();