OSDN Git Service

bit.ly のAPIキーの検証が常に失敗する不具合を修正
[opentween/open-tween.git] / OpenTween / AppendSettingDialog.cs
index 73eb49e..2523f82 100644 (file)
@@ -311,6 +311,9 @@ namespace OpenTween
             var timeout = int.Parse(this.ConnectionPanel.ConnectionTimeOut.Text.Trim());
             Networking.DefaultTimeout = TimeSpan.FromSeconds(timeout);
 
+            var uploadImageTimeout = int.Parse(this.ConnectionPanel.UploadImageTimeout.Text.Trim());
+            Networking.UploadImageTimeout = TimeSpan.FromSeconds(uploadImageTimeout);
+
             Networking.ForceIPv4 = this.ConnectionPanel.checkBoxForceIPv4.Checked;
 
             TwitterApiConnection.RestApiHost = this.ConnectionPanel.TwitterAPIText.Text.Trim();
@@ -380,7 +383,7 @@ namespace OpenTween
                     var responseText = await response.Content.ReadAsStringAsync()
                         .ConfigureAwait(false);
 
-                    return responseText == "1";
+                    return responseText.TrimEnd() == "1";
                 }
             }
             catch (OperationCanceledException) { }