Commit 208fc01f authored by Łukasz Nowak's avatar Łukasz Nowak

Do less iterations.

The per character precision is not needed and expensive. Chomp slice faster,
as anyway text will be truncated.
parent 6ac448af
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts22064749.78</string> </value> <value> <string>ts22064959.09</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -81,7 +81,7 @@ function setSoftwareReleaseEntry(item, append_to, insert_before) {\n ...@@ -81,7 +81,7 @@ function setSoftwareReleaseEntry(item, append_to, insert_before) {\n
var original_text = description.text()\n var original_text = description.text()\n
var length = original_text.length;\n var length = original_text.length;\n
while(description.height() > maxh) {\n while(description.height() > maxh) {\n
length--;\n length-=5;\n
truncated = true;\n truncated = true;\n
description.text(original_text.slice(0, length));\n description.text(original_text.slice(0, length));\n
}\n }\n
...@@ -259,7 +259,7 @@ function hashController ()\n ...@@ -259,7 +259,7 @@ function hashController ()\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>7418</int> </value> <value> <int>7419</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment