Skip to content

Commit 9012ab3

Browse files
use url field
1 parent 4e948ee commit 9012ab3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

source/gui_main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ tsl::elm::Element *MainGui::createUI() {
3939
auto *button = new tsl::elm::ListItem("Upload");
4040
button->setClickListener([&](u64 keys) {
4141
if (keys && KEY_A && !this->uploaded) {
42-
this->url = web::UploadImage(this->fileId);
42+
std::string url = web::UploadImage(this->fileId);
4343
this->uploaded = true;
44-
list->addItem(new tsl::elm::ListItem(url));
44+
this->img->setUrl(url);
4545
return true;
4646
}
4747
return false;

source/gui_main.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
class MainGui : public tsl::Gui {
2424
private:
2525
ImageItem *img;
26-
std::string url;
2726
bool uploaded = false;
2827
CapsAlbumFileId fileId;
2928

0 commit comments

Comments
 (0)