Skip to content
Snippets Groups Projects
Commit e5ff66e0 authored by Massimiliano's avatar Massimiliano
Browse files

Fixed app crash on tappin mail icon

parent b16b0a92
Branches
Tags
No related merge requests found
...@@ -151,21 +151,17 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL ...@@ -151,21 +151,17 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
// Locate the button in activity_main.xml // Locate the button in activity_main.xml
button = findViewById(R.id.MailBtn);//MailBtn button = findViewById(R.id.MailBtn);//MailBtn
button.setOnLongClickListener(new View.OnLongClickListener() { button.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
showMailInfo(); showMailInfo();
return true; return true;
} }
}); });
// Capture button clicks
button.setOnClickListener(new View.OnClickListener() { button.setOnClickListener(new View.OnClickListener() {
public void onClick(View arg0) { public void onClick(View arg0) {
// Start NewActivity.class
String k9 = "com.fsck.k9"; String k9 = "com.fsck.k9";
Intent mail = getPackageManager().getLaunchIntentForPackage(k9); Intent mail = getPackageManager().getLaunchIntentForPackage(k9);
if(mail == null&&(firstStart.getBoolean("firsttap", false))) { if(mail == null) {
mail = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+k9)); mail = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+k9));
}//first time tap check }//first time tap check
if (firstStart.getBoolean("firsttap", true)){ if (firstStart.getBoolean("firsttap", true)){
...@@ -174,8 +170,10 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL ...@@ -174,8 +170,10 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
} }
else startActivity(mail); else startActivity(mail);
} }
}); });
button = findViewById(R.id.CloudBtn);//CloudBtn button = findViewById(R.id.CloudBtn);//CloudBtn
button.setOnLongClickListener(new View.OnLongClickListener() { button.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<changelog> <changelog>
<release version="0.9.2" versioncode="7" > <release version="0.9.2" versioncode="7" >
<change>Fixed app crash on tapping mail icon</change>
<change>Fixed first time asking xmpp client</change> <change>Fixed first time asking xmpp client</change>
<change>Italian translation added</change> <change>Italian translation added</change>
<change>fixed Spanish typos</change> <change>fixed Spanish typos</change>
......
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