Skip to content

Commit 85144e3

Browse files
committed
Allow spaces in username
1 parent dbd9b14 commit 85144e3

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

QuestForm.cs

+4-10
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ private void QuestForm_FormClosed(object sender, FormClosedEventArgs e)
9494
Properties.Settings.Default.Save();
9595
}
9696
}
97+
9798
private void QuestForm_Load(object sender, EventArgs e)
9899
{
99100
DeleteShots.Checked = Properties.Settings.Default.delsh;
@@ -153,20 +154,13 @@ private void questVids_Click(object sender, EventArgs e)
153154
_ = MessageBox.Show("Transfer finished! Recordings can be found in a folder named Quest Recordings on your desktop!");
154155
Program.form.changeTitle("Done!");
155156
}
157+
156158
private void button3_Click(object sender, EventArgs e)
157159
{
158-
if (GlobalUsername.Text.Contains(" "))
159-
{
160-
_ = MessageBox.Show("Usernames with a space are not permitted.", "Detected a space in username!");
161-
}
162-
else
163-
{
164-
_ = ADB.RunAdbCommandToString($"shell settings put global username {GlobalUsername.Text}");
165-
_ = MessageBox.Show($"Username set as {GlobalUsername.Text}", "Success");
166-
}
160+
_ = ADB.RunAdbCommandToString($"shell settings put global username {GlobalUsername.Text}");
161+
_ = MessageBox.Show($"Username set as {GlobalUsername.Text}", "Success");
167162
}
168163

169-
170164
private void Form_KeyDown(object sender, KeyEventArgs e)
171165
{
172166
if (e.KeyCode == Keys.Escape)

0 commit comments

Comments
 (0)