aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Cache.cpp11
-rw-r--r--src/Channel.cpp2
-rw-r--r--src/Text.cpp2
3 files changed, 11 insertions, 4 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp
index fe377e8..0610a18 100644
--- a/src/Cache.cpp
+++ b/src/Cache.cpp
@@ -63,6 +63,13 @@ namespace dchat
return dchatHomeDir;
}
+ boost::filesystem::path Cache::getImagesDir()
+ {
+ boost::filesystem::path imagesDir = getDchatDir() / "images";
+ boost::filesystem::create_directories(imagesDir);
+ return imagesDir;
+ }
+
void Cache::loadBindsFromFile()
{
StringView fileContent;
@@ -157,7 +164,7 @@ namespace dchat
bool failed = exitStatus != 0;
if(!failed)
{
- boost::filesystem::path filepath = getDchatDir();
+ boost::filesystem::path filepath = getImagesDir();
odhtdb::Hash urlHash(it->url.data(), it->url.size());
filepath /= urlHash.toString();
@@ -209,7 +216,7 @@ namespace dchat
return it->second;
// TODO: Verify hashed url is not too long for filepath on windows
- boost::filesystem::path filepath = getDchatDir();
+ boost::filesystem::path filepath = getImagesDir();
odhtdb::Hash urlHash(url.data(), url.size());
filepath /= urlHash.toString();
diff --git a/src/Channel.cpp b/src/Channel.cpp
index ce8c76c..ae66e3c 100644
--- a/src/Channel.cpp
+++ b/src/Channel.cpp
@@ -45,7 +45,7 @@ namespace dchat
}
{
- Message *message = new Message(&systemUser, u8"[emoji](https://discordemoji.com/assets/emoji/PepeDab.gif)");
+ Message *message = new Message(&systemUser, u8"[emoji](https://discordemoji.com/assets/emoji/PepeDab.gif)[emoji](https://cdn.discordapp.com/emojis/398569871761473538.png?v=1)");
messageBoard.addMessage(message);
}
diff --git a/src/Text.cpp b/src/Text.cpp
index b22a27d..02ea6fa 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -8,7 +8,7 @@ namespace dchat
{
const float TAB_WIDTH = 4.0f;
const float EMOJI_PADDING = 5.0f;
- const float EMOJI_SCALE_WITH_TEXT = 1.0f;
+ const float EMOJI_SCALE_WITH_TEXT = 1.7f;
const float EMOJI_SCALE_STANDALONE = 5.0f;
Text::Text(const sf::Font *_font) :