}
[Fact]
+ public void DeleteHashtag_MultipleTest()
+ {
+ var hashtags = new[] { "#foo", "#bar", "#baz" };
+
+ using (var atDialog = new AtIdSupplement())
+ using (var hashDialog = new HashtagManage(atDialog, hashtags, "", false, false, false))
+ {
+ hashDialog.RunSilent = true;
+
+ hashDialog.HistoryHashList.SelectedIndices.Add(2);
+ hashDialog.HistoryHashList.SelectedIndices.Add(1);
+
+ TestUtils.FireEvent(hashDialog.DeleteButton, "Click"); // 「削除(&D)」ボタン
+
+ Assert.Equal(new[] { "#foo" }, hashDialog.HistoryHashList.Items.Cast<string>());
+ Assert.Equal(new[] { "#foo" }, hashDialog.HashHistories);
+ }
+ }
+
+ [Fact]
public void DeleteHashtag_NotSelectTest()
{
var hashtags = new[] { "#foo", "#bar" };
{
return;
}
- for (int i = 0; i < HistoryHashList.SelectedIndices.Count; i++)
+
+ // 削除によってインデックス番号が変わらないように逆順に処理する
+ var selectedIndices = this.HistoryHashList.SelectedIndices.Cast<int>()
+ .OrderByDescending(x => x).ToArray();
+
+ foreach (var idx in selectedIndices)
{
- if (UseHashText.Text == HistoryHashList.SelectedItems[0].ToString()) UseHashText.Text = "";
- HistoryHashList.Items.RemoveAt(HistoryHashList.SelectedIndices[0]);
+ if (UseHashText.Text == HistoryHashList.Items[idx].ToString()) UseHashText.Text = "";
+ HistoryHashList.Items.RemoveAt(idx);
}
if (HistoryHashList.Items.Count > 0)
{
* FIX: Home/Endキーの直後に左右キーを押すと以前の選択ツイートの関連発言に移動してしまう不具合を修正 (thx @coookien!)
* FIX: 発言詳細部のコンテキストメニューからURLのコピーを実行すると「&」が「&」としてコピーされる不具合を修正 (thx @pO_0q!)
* FIX: タイムラインの流速が速い時に発言一覧のスクロールバーがちらつく現象を修正
+ * FIX: ハッシュタグ設定画面で複数のハッシュタグを選択して削除する機能が正しく動作しない不具合を修正 (thx @Tan90909090!)
==== Ver 1.2.9(2015/09/23)
* NEW: ウィンドウ最大化中でも発言詳細部やサムネイルの幅の変更が設定に保存されるようしました