Commit 74bb67fa authored by Grigory Fedorov's avatar Grigory Fedorov

Merge branch 'release/1.0.8'

parents 6e28a9e4 20f036bf
......@@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
versionCode 179
versionName '1.0.7'
versionCode 180
versionName '1.0.8'
}
compileOptions {
......
......@@ -199,7 +199,7 @@
</activity>
<activity
android:name="com.xabber.android.ui.preferences.ChatEditor"
android:name=".ui.preferences.ChatContactSettings"
android:label="@string/chat_settings"
android:parentActivityName="com.xabber.android.ui.ChatViewer"
>
......@@ -334,7 +334,7 @@
</activity>
<activity
android:name="com.xabber.android.ui.preferences.ChatSettings"
android:name=".ui.preferences.ChatGlobalSettings"
android:parentActivityName="com.xabber.android.ui.preferences.PreferenceEditor">
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
......
......@@ -252,7 +252,7 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
getSelectedPageDataFromIntent();
if (intent.getAction().equals(ACTION_SHORTCUT)) {
if (intent.getAction() != null && intent.getAction().equals(ACTION_SHORTCUT)) {
getInitialChatFromIntent();
initChats();
}
......
......@@ -50,7 +50,7 @@ import com.xabber.android.ui.adapter.ChatMessageAdapter;
import com.xabber.android.ui.dialog.ChatExportDialogFragment;
import com.xabber.android.ui.helper.AccountPainter;
import com.xabber.android.ui.helper.ContactTitleInflater;
import com.xabber.android.ui.preferences.ChatEditor;
import com.xabber.android.ui.preferences.ChatContactSettings;
public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItemClickListener,
View.OnClickListener, Toolbar.OnMenuItemClickListener, ChatMessageAdapter.Message.MessageClickListener {
......@@ -442,7 +442,7 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
return true;
case R.id.action_chat_settings:
startActivity(ChatEditor.createIntent(getActivity(), account, user));
startActivity(ChatContactSettings.createIntent(getActivity(), account, user));
return true;
case R.id.action_show_history:
......
......@@ -27,17 +27,15 @@ import com.xabber.android.data.intent.EntityIntentBuilder;
import com.xabber.android.ui.helper.BarPainter;
import com.xabber.android.ui.helper.ManagedActivity;
public class ChatEditor extends ManagedActivity
implements ChatEditorFragment.ChatEditorFragmentInteractionListener {
public class ChatContactSettings extends ManagedActivity
implements ChatContactSettingsFragment.ChatEditorFragmentInteractionListener {
private String account;
private String user;
private AccountItem accountItem;
public static Intent createIntent(Context context, String account,
String user) {
return new EntityIntentBuilder(context, ChatEditor.class)
.setAccount(account).setUser(user).build();
public static Intent createIntent(Context context, String account, String user) {
return new EntityIntentBuilder(context, ChatContactSettings.class).setAccount(account).setUser(user).build();
}
private static String getAccount(Intent intent) {
......@@ -72,7 +70,7 @@ public class ChatEditor extends ManagedActivity
if (savedInstanceState == null) {
getFragmentManager().beginTransaction()
.add(R.id.fragment_container, new ChatEditorFragment()).commit();
.add(R.id.fragment_container, new ChatContactSettingsFragment()).commit();
}
}
......
......@@ -12,13 +12,13 @@ import com.xabber.android.data.message.chat.ChatManager;
import java.util.HashMap;
import java.util.Map;
public class ChatEditorFragment extends BaseSettingsFragment {
public class ChatContactSettingsFragment extends BaseSettingsFragment {
private ChatEditorFragmentInteractionListener mListener;
@Override
protected void onInflate(Bundle savedInstanceState) {
addPreferencesFromResource(R.xml.chat_editor);
addPreferencesFromResource(R.xml.preference_chat_contact);
AccountItem accountItem = mListener.getAccountItem();
......@@ -101,9 +101,7 @@ public class ChatEditorFragment extends BaseSettingsFragment {
public interface ChatEditorFragmentInteractionListener {
String getAccount();
AccountItem getAccountItem();
String getUser();
}
}
......@@ -8,7 +8,7 @@ import com.xabber.android.ui.helper.BarPainter;
import com.xabber.android.ui.helper.ManagedActivity;
import com.xabber.android.ui.helper.PreferenceSummaryHelper;
public class ChatSettings extends ManagedActivity {
public class ChatGlobalSettings extends ManagedActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -31,7 +31,7 @@ public class ChatSettings extends ManagedActivity {
if (savedInstanceState == null) {
getFragmentManager().beginTransaction()
.add(R.id.fragment_container, new ChatSettingsFragment()).commit();
.add(R.id.fragment_container, new ChatGlobalSettingsFragment()).commit();
}
}
}
......@@ -5,12 +5,12 @@ import android.os.Bundle;
import com.xabber.android.R;
import com.xabber.android.ui.helper.PreferenceSummaryHelper;
public class ChatSettingsFragment extends android.preference.PreferenceFragment {
public class ChatGlobalSettingsFragment extends android.preference.PreferenceFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preference_chat);
addPreferencesFromResource(R.xml.preference_chat_global);
PreferenceSummaryHelper.updateSummary(getPreferenceScreen());
}
......
......@@ -13,7 +13,9 @@ public class DebugSettingsFragment extends android.preference.PreferenceFragment
addPreferencesFromResource(R.xml.preference_debug);
getPreferenceScreen().findPreference(getString(R.string.debug_log_key)).setEnabled(LogManager.isDebugable());
if (!LogManager.isDebugable()) {
getPreferenceScreen().removePreference(getPreferenceScreen().findPreference(getString(R.string.debug_log_key)));
}
PreferenceSummaryHelper.updateSummary(getPreferenceScreen());
}
......
......@@ -15,25 +15,25 @@
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<CheckBoxPreference
android:title="@string/save_history"
android:key="@string/chat_save_history_key"
android:title="@string/save_history"
/>
<com.xabber.android.ui.widget.RingtonePreference
android:title="@string/events_sound"
android:key="@string/chat_events_sound_key"
android:ringtoneType="notification"
android:showDefault="true"
android:showSilent="true"
android:showDefault="true" />
android:title="@string/events_sound" />
<CheckBoxPreference
android:title="@string/events_show_text"
android:key="@string/chat_events_show_text_key"
android:title="@string/events_show_text"
/>
<CheckBoxPreference
android:title="@string/events_vibro"
android:key="@string/chat_events_vibro_key"
android:title="@string/events_vibro"
/>
<CheckBoxPreference
android:title="@string/events_visible_chat"
android:key="@string/chat_events_visible_chat_key"
android:title="@string/events_visible_chat"
/>
</PreferenceScreen>
......@@ -30,7 +30,7 @@
android:key="@string/preference_chats"
android:title="@string/preference_chats">
<intent
android:targetClass="com.xabber.android.ui.preferences.ChatSettings"
android:targetClass="com.xabber.android.ui.preferences.ChatGlobalSettings"
android:targetPackage="@string/application_package" />
</Preference>
<Preference
......
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