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

Merge branch 'release/1.0.8'

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